快捷键
复制/粘贴/剪切 command + c/v/x
向下复制 command + d
撤销/反撤销 command + z / command + shift + z
当前文件查找 command + f (可以区分大小写 + 精准匹配)
全局查找 command + shift + f (可以区分大小写 + 精准匹配)
当前文件替换 command + h (可以按照顺序1个个替换,也可以全部替换)
全局替换 command + shift + h
快速定位到某一行 control + g
放到/缩小编辑器界面 command + command -
快速选中某块区域 鼠标点击开始位置 + shift + 鼠标点击结束位置
选中代码左移/右移 shift + -> ->
删除一行:command+Shilft+K
返回/前进 Go back / forward (改动快捷键成) command + ←/→
新窗口 command + n
关闭窗口 command + w
vscode git 相关操作
推送代码的常规操作
【1】git stash "自定义贮藏名称"
【2】git pull
【3】git unstash "指定的贮藏"
【4】解决冲突 (保留本地|保留双方|保留远程)
【5】git add . (或者文件右侧的 + )
【6】git commit -m 注释
【7】git push origin [远程分支名称]
【8】在远程仓库手动执行合并。
settings.json
{
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"git.autofetch": true,
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"javascript.inlayHints.parameterTypes.enabled": true,
"cSpell.languageSettings": [],
"vetur.format.defaultFormatter.html": "js-beautify-html",
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_line_length": 2500,
"wrap_attributes": "auto",
"end_with_newline": false
},
"prettyhtml": {
"printWidth": 2500,
"singleQuote": false,
"wrapAttributes": false,
"sortAttributes": false
}
},
"editor.semanticTokenColorCustomizations": {
},
"javascript.updateImportsOnFileMove.enabled": "always",
"vetur.validation.script": false,
}
代码片段
{
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1', $1);"
],
"description": "Log output to console"
},
"Print to vueTemplate": {
"prefix": "vu",
"body": [
"<template>",
" <div class=''>\n",
" </div>",
"</template>\n",
"<script>",
"export default {",
" name: '',",
" components: {\n",
" },",
" props: {\n",
" },",
" data() {",
" return {\n",
" }",
" },",
" computed: {\n",
" },",
" watch: {\n",
" },",
" created() {\n",
" },",
" mounted() {\n",
" },",
" methods: {\n",
" },",
"};",
"</script>\n",
"<style scoped>\n",
"</style>\n",
],
"description": "Create vue template"
},
"Print to zhushi": {
"prefix": "zhu",
"body": [
"/**",
" * @desc $2",
" * @param {$3} $4 $5",
" * @return {$6} $7",
" */"
],
"description": "a func mode"
}
}
插件 未完待续
vetur
TODO Highlight
open in browser
markdown preview enhanced
chinese
back and forward
auto rename tag