How to use vim (key-bindings) with Visual Studio Code vim extension

Add the following to settings.json (open the Command Pallete and search for "User Settings"):

"vim.insertModeKeyBindings": [
     {
         "before": ["j", "j"],
         "after": ["<esc>"]
     }
]

That should do it.


If you running on Linux and have used setxkbmap to remap Esc to Caps-Lock and have problems, I suggest the following workaround Fix for Esc remapping.

The solution is to add the following to your User Settings

"keyboard.dispatch": "keyCode"

You should save and restart after that enter image description here