如何在没有 IntelliSense 的情况下触发快速建议 [英] How to trigger quick suggestions without IntelliSense

查看:22
本文介绍了如何在没有 IntelliSense 的情况下触发快速建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法为 IntelliSense 不支持的文件中的单词打开快速建议/自动完成功能?例如,在 Sublime 中,快速建议框会建议文件中的匹配词,这通常会非常有用.

如果我手动触发建议框,我希望在键入时自动显示的建议会显示出来.只是想让它们出现,而不需要我不断按 ctrl+space.

editor.quickSuggestions 已经是真的,我已经解决了延迟问题.没什么.

解决方案

VSCode 没有为 基本语言.作为一种解决方法,您可以尝试按以下形状添加多个键控:

转到AppMenu |文件 >首选项键盘快捷键 并在您的 keybindings.json 文件中使用:

<预><代码>[{ "key": "a", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },{ "key": "b", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" }...]

我知道这很难看,但这是我能想到的唯一解决方法,直到添加这样的设置.

Is there any way to turn on quick-suggestions/auto-complete for words in a file that isn't supported by IntelliSense? For instance in Sublime the quick suggest box will suggest matching words in the file which usually ends up pretty useful.

If I manually trigger the suggestion box the suggestions I would want to have automatically show up while typing do show up. Just trying to make them show up without me hitting ctrl+space constantly.

editor.quickSuggestions is already true and I've played around with the delay. Nothing.

解决方案

VSCode doesn't have a setting to enable 24x7 suggestions for basic languages. As a workaround, you can try adding many keyindings in the following shape:

Go to AppMenu | File > Preferences > Keyboard Shortcuts and in your keybindings.json file use:

[
{ "key": "a", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "b", "command": "^editor.action.triggerSuggest", "when": "editorTextFocus" }
...
]

I know it's ugly, but this is the only workaround I can think of until such a setting is added.

这篇关于如何在没有 IntelliSense 的情况下触发快速建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆