Search code examples
visual-studio-codevscode-keybindingvim-quickfix

How can I set keyboard shortcuts for selecting suggestions in the VSCode QuickFix menu?


I use VSCode with the Vim extension and I want to navigate the QuickFix menu using Ctrl+j and Ctrl+k keyboard shortcuts. How can I do that?

enter image description here


Solution

  • I think that isn't possible because VS code uses native menu to show Quick Fix suggestions, according to this.

    There is an extension attempted to work around this by showing the suggestions on quick open instead of native menu so we can navigate through the suggestion using shortcut we usually use on quick open. Although, I can't get the extension work on my Flutter project.

    Despite the fact that we can't navigate up and down, we can navigate the menu by typing the first letter of the one of the suggestions. In your example, we can select the Wrap with widget menu by pressing w, then we can go to Wrap with Center by pressing w again. Pressing w will cycle through menu that starts with w. I got this working on Ubuntu 20.04 but I don't know if this works on other OSes.