VSCodeVim / Vim

:star: Vim for Visual Studio Code
http://aka.ms/vscodevim
MIT License
13.57k stars 1.3k forks source link

CTRL + P dosn't cycle through suggestions in Linux #9054

Open mcshaman opened 1 month ago

mcshaman commented 1 month ago

Describe the bug Apparently you are meant to be able to cycle through autocomplete suggestions using ctrl + p and ctrl + n. While ctrl + n works (allows me to cycle down) ctrI + p opens up the VS Code Quick File Open. The feature works on my Mac but no my Linux/Ubuntu box. I see there were previously issues with this but they all appear to be closed now.

To Reproduce

  1. Create new file e.g. index.html - so that VS code can suggest snippets for the file type
  2. Go to insert mode and start typing something that triggers suggestions e.g. "ht"
  3. Pressing ctrl + p triggers Quick File Open (not cycle as expected)

Expected behavior ctrl + p should cycle up through suggested options

Environment (please complete the following information):

one2three4f commented 4 weeks ago

Try adding this to keybindings.json It changes the vscode commands "selectPrevSuggestion" and "selectNextSuggestion"

    {
        "key": "ctrl+n",
        "command": "selectNextSuggestion",
        "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion"
    },
    {
        "key": "ctrl+p",
        "command": "selectPrevSuggestion",
        "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus || suggestWidgetVisible && textInputFocus && !suggestWidgetHasFocusedSuggestion"
    },