Vim icon indicating copy to clipboard operation
Vim copied to clipboard

CTRL + P dosn't cycle through suggestions in Linux

Open mcshaman opened this issue 1 year ago • 1 comments

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):

  • Extension (VsCodeVim) version: v1.27.3
  • VSCode version: 1.89.1
  • OS: Ubuntu 22.04.4

mcshaman avatar Jun 04 '24 00:06 mcshaman

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"
    },

one2three4f avatar Jun 24 '24 18:06 one2three4f