第一部分:插件
VSCode内置"emmet"插件,"convert to utf-8"等插件效果!十分强大!代码提示功能特别强悍!
VSCode官网插件地址:点击此处!
插件总览:插件越来越多,就不一一详解了!
插件部分详解:
1.vscode-icons:文件都能以图标修饰,十分清晰明了,易于查看!
效果:
2.Open Html in Default Browser:html文件中,右键有“在默认浏览器中打开”的选项!
--中国人写的--
3.Paste and Indent:粘贴并缩进(目前版本只有粘贴,没有粘贴缩进功能!);链接
设置:“键盘快捷方式”-》keybindings.json:
[
{
"key": "ctrl+v",
"command": "pasteAndIndent.action",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+v",
"command": "editor.action.clipboardPasteAction",
"when": "!editorTextFocus"
},
{
"key": "ctrl+shift+v",
"command": "editor.action.clipboardPasteAction",
"when": "editorTextFocus && !editorReadonly"
}
]
mac系统应该是:"ctrl"相应的改为"cmd"!
4.Path Intellisense:路径补全功能!
5.JQuery Code Snippets:jQuery代码片段
输入jq就可以看到很多片段了,不过感觉有了jQuery代码提示(参见我的另一篇博客:http://www.cnblogs.com/why-not-try/p/8044766.html),这个显得鸡肋!
第二部分:用户设置(settings.json)
{
"editor.fontSize": 19,
"editor.fontFamily": "Consolas",
//换行
"editor.wordWrap": "on",
// 配置php可执行文件:
"php.validate.executablePath": "D:/Xampp/php/php.exe",
"workbench.iconTheme": "vscode-icons",
"git.path":"d:/git/Git/mingw64/libexec/git-core/git.exe" ,
//关闭自动更新扩展
"extensions.autoUpdate": false,
//右键格式化文件
"prettier.singleQuote": true,
"prettier.semi":false,
"vetur.format.defaultFormatter.html": "js-beautify-html",
//配置eslint
"eslint.autoFixOnSave": true,
"files.autoSave":"off",
"eslint.validate": [
"javascript",
"javascriptreact",
"html",
{ "language": "vue", "autoFix": true }
],
"eslint.options": {
"plugins": ["html"]
},
//为了符合eslint的两个空格间隔原则
"editor.tabSize": 2 }