文章目录
- vscode❤️javascript官方特性演示介绍
-
- intellisens
- [IntelliSense features#](https://code.visualstudio.com/docs/editor/intellisense#_intellisense-features)
- 以下内容非常有用,可以帮助您更好的配置智能提示补全等行为
- [customizing-intellisense in Visual Studio Code](https://code.visualstudio.com/docs/editor/intellisense#_customizing-intellisense)
- [Types of completions#](https://code.visualstudio.com/docs/editor/intellisense#_types-of-completions)
- 自定代码片段
vscode❤️javascript官方特性演示介绍
JavaScript Programming with Visual Studio Code
intellisens
IntelliSense IntelliSense is a general term for various code editing
features including: code completion, parameter info, quick info, and
member lists. IntelliSense features are sometimes called by other
names such as “code completion”, “content assist”, and “code hinting.”
IntelliSense features#
以下内容非常有用,可以帮助您更好的配置智能提示补全等行为
customizing-intellisense in Visual Studio Code
Types of completions#
自定代码片段
带有个人风格的(比如下划线结尾,就可以干掉不需要的部分)
甚至,你还可以配置sout
(来自IDEA的习惯),映射到console.log
反正不同语言也不会相互干扰.
由于vscode 的补全中包括了对之前输入过的内容的引用(虽然着有时很有用,但在这里显得有些碍手碍脚),导致第二次输入log的时候console.log
不再是第一个候选,那么可以通过在自定义片段,通过新的缩写来保持补全的候选第一
snippet
调整snippet
也许也能够较好的结局您的问题:
Snippets in suggestions#
By default, VS Code shows snippets and completion proposals in one widget. You can control the behavior with the editor.snippetSuggestions
setting. To remove snippets from the suggestions widget, set the value to "none"
. If you’d like to see snippets, you can specify the order relative to suggestions; at the top ("top"
), at the bottom ("bottom"
), or inline ordered alphabetically ("inline"
). The default is "inline"
.
效果
关闭基于单词的提示
配置入口
"log to the console by cxxu design": {
"prefix": [
"sout",
"log_",
"lg_",
"lgd",
"lg",
"D"
],
"body": [
"console.log($1)"
],
"description": "print to check the program"
}
基于工作空间的配置
变量的提示某些时候也挺有用的,但是有时他是真的烦)
您可以在某个工作空间内(vscode打开的目录以及其子目录的作用空间)
禁用到某些种类的提示