Joe Casadonte
Joe Casadonte

Reputation: 16889

How can I move my cursor horizontally by whitespace in VS-Code?

VSCode Version: 1.56.2

Given a line like the following in plaintext mode:

foo-bar-baz FooBarBaz FOO BAR BAZ

With my cursor at the beginning of the line, using cursorWordPartRight (bound to ctrl-right on my machine), my cursor will stop in each of these locations:

foo-bar-baz FooBarBaz FOO BAR BAZ
   ^^  ^^  ^^  ^  ^  ^^  ^^  ^^  ^

With my cursor at the beginning of the line, using cursorWordEndRight (bound to option/alt-right on my machine), my cursor will stop in each of these locations:

foo-bar-baz FooBarBaz FOO BAR BAZ
   ^   ^   ^         ^   ^   ^   ^

What I'd like to do is to move by whitespace. So with my cursor at the beginning of the line, what function can I use to move by whitespace, stopping in each of these locations:

foo-bar-baz FooBarBaz FOO BAR BAZ
           ^         ^   ^   ^   ^

Thanks!

Upvotes: 2

Views: 1028

Answers (1)

Mark
Mark

Reputation: 182831

If you just remove the - from your Editor: Word Separators setting than cursorWordEndRight, cursorWordEndLeft, cursorWordRight, cursorWordLeft, etc. act as you want.

Upvotes: 0

Related Questions