Moving Around in Visual Studio with VIM emulation mods

February 11, 2021 tech full-stack

I just started using VS Code/Visual Studio Code. I’ve been a vim guy for years, and have tried Atom, which was pretty good. Then I started seeing all these youtube videos where people used VS Code, and I thought I’d give it a try.

It’s pretty good, but I’m still getting used to it. I installed the vim emulation, but it’s not quite how it works for me in vim. One of the issues is repeating keys.

In vim, you can move with hjkl. This is so intuitive for me, that I actually had to open vim to check which keys I used. I couldn’t remember. It just happens.

But, though I know you can jump words with (hold on, let me check), “b” and “w”, I rarely do, unless I’m in visual mode and am trying to highlight a word to yank or something.

Often, I just hold down the “j” or “k” key to scroll up and down the page. Not ideal, but after fifteen years… Anyway, VS Code doesn’t allow for pushing a key and have it repeat. And this was very frustrating.

Solving was simple, though:

Open up your terminal and paste in this line:

defaults write ApplePressAndHoldEnabled -bool false

Then, restart VSC and you’re set!