我的vue文件终于可以有模板并且有html补全功能了。
ctrl+shift+p ,找到snippets---->输入vue---->enter---->vue.json(模板根据需求自己定义)
{
"Print to console": {
"prefix": "vue",
"body": [
"",
" \n",
" ",
"\n",
"\n",
"",
"$2"
],
"description": "Log output to console"
}
}
settings.json,不必设置什么*.vue为html,这样模板就失效了。加上这句就好了。敲开心。
//VSCode中emmet被自动提示覆盖问题
"key": "tab",
"command": "editor.emmet.action.expandAbbreviation",
"when": "config.emmet.triggerExpansionOnTab && editorTextFocus && !editorHasMultipleSelections && !editorHasSelection && !editorReadonly && !editorTabMovesFocus"
由于当时配置了很久才成功,在这里存一下笔记咯。以备不时之需。
c_cpp_properties.json
{
"configurations": [
{
"name": "(gdb) Launch",
"intelliSenseMode": "clang-x64",
"includePath": [
"${workspaceFolder}",
"D:/mingw64/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++",
"D:/mingw64/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32",
"D:/mingw64/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward",
"D:/mingw64/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include",
"D:/mingw64/mingw64/include",
"D:/mingw64/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed"
],
"defines": [
"_DEBUG",
"UNICODE",
"__GNUC__=7",
"__cdecl=__attribute__((__cdecl__))"
],
"browse": {
"path": [
"${workspaceFolder}",
"D:/mingw64/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++",
"D:/mingw64/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/x86_64-w64-mingw32",
"D:/mingw64/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/backward",
"D:/mingw64/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include",
"D:/mingw64/mingw64/include",
"D:/mingw64/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include-fixed"
]
}
}
],
"version": 4
}
launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
// "program": "${workspaceFolder}",
//"cwd":"${workspaceFolderDirname}",
// "program": "${workspaceFolder}00-helloworld.js",
"program": "${file}",
"cwd":"${fileDirname}",
"skipFiles": [
"/**"
]
},
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
},
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "D:\\mingw64\\mingw64\\bin\\gdb.exe",
"preLaunchTask": "task g++" ,
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
}
]
}
settings.json
{
"files.autoGuessEncoding": true,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/tmp": true,
"**/node_modules": true,
"**/bower_components": true,
"**/dist": true
},
"files.watcherExclude": {
"**/**": true,
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/**": true,
"**/tmp/**": true,
"**/bower_components/**": true,
"**/dist/**": true
},
"search.followSymlinks": false,
// "files.associations": {
// "*.cjson":"jsonc",
// "*.wxss":"css",
// "*.wxs":"javascript",
// "*.js":"javascript",
// "*.pug":"jade",
// "*.nvue":"vue"
// },
// "files.associations": {
// "*.ejs":"html",
// "*.js":"html",
// "*.vue":"html"
// },
// "emmet.triggerExpansionOnTab": true,
// "emmet.includeLanguages":{
// "vue-html":"html",
// "vue":"html"
// },
// 让vscode允许自定义的代码片段提示出来
//"editor.snippetSuggestions": "top",
//"editor.formatOnPaste": true,
//"editor.snippetSuggestions": "top",
//"emmet.showExpandedAbbreviation": "never"
//VSCode中emmet被自动提示覆盖问题
"key": "tab",
"command": "editor.emmet.action.expandAbbreviation",
"when": "config.emmet.triggerExpansionOnTab && editorTextFocus && !editorHasMultipleSelections && !editorHasSelection && !editorReadonly && !editorTabMovesFocus"
}
tasks.json
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "task g++",
"command": "D:\\mingw64\\mingw64\\bin\\g++.exe",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "D:\\mingw64\\mingw64\\bin"
},
"problemMatcher": [
"$gcc"
],
"group": "build"
}
]
}