使用自定义键盘快捷键导航vscode intellisense

时间:2019-09-28 04:44:43

标签: vscode-settings

我将光标移动键从箭头键更改为“ alt + jkl;”,效果很好,但是仍然存在一个问题:我无法使用自定义键盘快捷键来导航代码intellisense,任何解决方案?预先感谢。

更新:禁用了一些设置,以使@Mark的答案正常工作

{
    "key": "alt+i",
    "command": "cursorUp",
    "when": "textInputFocus && !suggestWidgetVisible"
  },
  {
    "key": "alt+k",
    "command": "cursorDown",
    "when": "textInputFocus && !suggestWidgetVisible"
  },

1 个答案:

答案 0 :(得分:1)

我不知道您想要什么键,但是请尝试以下操作:

  {
    "key": "alt+j",
    "command": "selectNextSuggestion",  // same as downarrow
    "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
  },

  {
    "key": "alt+k",
    "command": "acceptSelectedSuggestion",  // same as tab/select
    "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
  },

  {
   "key": "alt+l",
   "command": "selectPrevSuggestion",  // same as uparrow
    "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
  },

仅显示一个建议时,使用简单的"when": "suggestWidgetVisible"测试一下是否适合您。