Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual studio code navigate by sub-word white space

I have added the following keyboard shortcuts to vscode, so when I hold control, and hit left or right, it will navigate and delete by subwords, rather than whole words (this is how I have it in SublimeText).

{ "key": "ctrl+right", "command": "cursorWordPartRight", "when": "textInputFocus" },
{ "key": "ctrl+left", "command": "cursorWordPartLeft", "when": "textInputFocus" },
{ "key": "ctrl+delete", "command": "deleteWordPartRight", "when": "textInputFocus" },
{ "key": "ctrl+backspace", "command": "deleteWordPartLeft", "when": "textInputFocus" }

So if I had the word "CamelCase" and the caret was on the first C in camel, hitting control+right would move the cursor to the first C in Case, instead of the the last word.

The only problem is that now vscode treats every single character of white space as an indivisual subword, instead of all contiguous strings of white space as a single subword.

For example if I have the two words separated by 4 spaces....

wordOne    wordTwo

pressing control+right, while the cursor is at the first whitespace char (after the e), should just jump all 4 white space characters to the first w in wordTwo....but this is not the case.

Is there a way to configure the editor such that this behaviour is achievable?

like image 378
Scorb Avatar asked Sep 26 '18 03:09

Scorb


1 Answers

Turns out this was a bug that was fixed in a later insider version of VSCode.

like image 171
Scorb Avatar answered Oct 01 '22 15:10

Scorb