For those who enjoy using vim but would like to (or need to) use Visual Studio Code, there is an option, and that is a vim emulation extension available in the Extensions Marketplace. To install the extension, follow these steps:

  1. From VS Code, select the Extensions side menu option, or View|Extensions window menu option, or enter the keyboard shortcut shift+cmd+x.
  2. In the extension pane’s search field, enter vim or, more specifically vscodevim. Find the Vim extension, with the description ‘Vim emulation for Visual Studio Code.’
  3. Click the Install button, and reload if prompted. vim key bindings should now be available while editing code.
  4. Key repeat may not work as it typically does in vim, for example when holding down the j or k keys for vertical navigation. In that case, the following command may be run from a terminal at the command line to enable it:
defaults.write ApplePressAndHoldEnabled -bool false

[To undo this setting, the command can be run again with the -bool switch set to true.]

Additional settings and documentation may be found at the extension’s GitHub repository.