0

I am using vscodevim extension with Visual Studio Code.

I would love to use hjkl keys as arrow keys in contextual menus, specially for the intellisense.

Any idea how to enable this option?

If vscodevim extension does not support this feature, which shortcut can be used to move the cursor within the contextual menu without touching the arrow keys?

sudo bangbang
  • 27,127
  • 11
  • 75
  • 77
GibboK
  • 71,848
  • 143
  • 435
  • 658

3 Answers3

1

Try

{
  "key": "h",
  "command": "selectNextSuggestion",
  "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
}

and

{
  "key": "l",
  "command": "selectPrevSuggestion",
  "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
}

Or whichever keys you wish to use. Those keybindings will cycle through the intellisense suggestions.

Mark
  • 143,421
  • 24
  • 428
  • 436
1

Add the following to your VSCode keybindings.json file:

{
    "key": "ctrl+k",
    "command": "selectPrevSuggestion",
    "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
},
{
    "key": "ctrl+j",
    "command": "selectNextSuggestion",
    "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
},

Credit goes to @GibboK for the link to this answer in a comment, above.

Michael Percy
  • 293
  • 1
  • 9
1

I have been looking for a way to do this (like Vim or Neovim J/K/L/M ), without installing any extension. I found a configuration on github, here

Just copy and paste ( with comments ) in the keybindings.json file of VS Code , icon on the top right or here.

You can also use a Jumpy extension to complement this configuration here.

AnderCover
  • 2,488
  • 3
  • 23
  • 42