Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do i change escape vim key binding to jk or something else in vscode. NB. vscode not vim editor

resources available on the web are only touching on vim editor. I am new to vim and I don't want to mess with my workspace settings. How do I go about changingg or keeping esc and adding jk as an optional key binding to leave insert mode in Vim in Vscode.

like image 969
kenneth kunusia Avatar asked Dec 01 '25 03:12

kenneth kunusia


1 Answers

You should change the vscode json settings.

To do that Press F2 or Ctrl+Shift+P to open the vscode command palette (command palette screenshot)

then you have to write this:

"vim.insertModeKeyBindings": [
{ //exit insert mode
  "before": [
    "j",
    "k"
  ],
  "after": [
    "<Esc>"
  ]
}]

This code is mapping jk as <Esc>. For more info on what settings the vim extension exposes, check out the documentation on github.

like image 185
Pol Ferdman Avatar answered Dec 04 '25 23:12

Pol Ferdman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!