如何为所有类型的文件自动显示建议菜单?

时间:2015-05-04 11:52:34

标签: intellisense visual-studio-code

我希望有一个自动下拉菜单,每当我写东西时都会提供可能的单词的建议,但不是在我使用Javascript,HTML或CSS模式时(它已经自动弹出),而是在纯文本文件中

这可能吗?

我试过看一下设置文件,但我还没找到怎么做。 通常我必须按 Ctrl + Space ,然后会出现一个弹出菜单,其中包含一些建议,这些建议基于您到目前为止输入的内容(我猜)。

1 个答案:

答案 0 :(得分:1)

VSCode目前不支持此功能。但是,您可以使用keybindings.json中的以下规则解决方法:

File > Preferences > Keyboard Shortcuts

[
{ "key": "a", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "b", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "c", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "d", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "e", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "f", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "g", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "h", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "i", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "j", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "k", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "l", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "m", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "n", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "o", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "p", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "q", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "r", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "s", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "t", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "u", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "v", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "w", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "x", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "y", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "z", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" }
]