I’ve been using VSCode for quite some time now. Generally speaking, I’ve been super happy with it. It’s ultra configurable, fairly light weight, very fast, and just generally a pleasure to work with.
Except….
They completely got handling of Ctrl-Right wrong. Try it in Word, try it in Notepad++, in Visual Studio, you name it, they all work a certain way.
But VSCode, not so much.
Now, it’d be easy enough to get used to it, if all my editors decided to change the default way they handle Ctrl-Right. But, yeah, no.
I’ve dealt with it for a while now but this weekend, I finally decided to have a look.
It took some Google-foo, but eventually I came across this post by Spongman that very accurately describes the problem.
I won’t repeat that here, but here’s the keybindings for VSCode that fix the problem.
{
"key": "ctrl+shift+right",
"command": "-cursorWordEndRightSelect",
"when": "textInputFocus"
},
{
"key": "ctrl+right",
"command": "-cursorWordEndRight",
"when": "textInputFocus"
},
{
"key": "ctrl+right",
"command": "-cursorWordAccessibilityRight",
"when": "accessibilityModeEnabled && textInputFocus"
},
{
"key": "ctrl+shift+right",
"command": "-cursorWordAccessibilityRightSelect",
"when": "accessibilityModeEnabled && textInputFocus"
},
{
"key": "ctrl+right",
"command": "cursorWordStartRight"
},
{
"key": "ctrl+shift+right",
"command": "cursorWordStartRightSelect"
}
It’s a bit tricky to get them installed in VSCode, what with the new Settings UI, but, once they’re there, Mwah! Perfection!