最近,打算换个编辑器,而 vscode 是一个不错的选择。大部分快捷键和 sublime 还是很像的,但有些也不一样。特此整理一份小笔记。
参考:
主命令:ctrl + shift + p
编辑器与窗口:
打开一个新窗口:ctrl + shift + n
关闭当前窗口:ctrl + shift + w
新建文件:ctrl + n
切出一个新的编辑器(最多3个):ctrl + ?,编辑器直接切换:ctrl + 1,ctrl + 2,ctrl + 3。左右对比是很有用
右侧编辑器打开文件直接切换:ctrl + tab
查找:
当前窗口查找文件:ctrl + p:文件名
当前文件内查找:ctrl + f:查找内容
当前文件查找替换:ctrl + h
当前文件行查找:ctrl + g:行号
当前窗口全局查找:ctrl + shift + f
格式调整:
大写:ctrl + shift + u
小写:ctrl + shift + L
代码缩进:ctrl + [ 、ctrl + ]
代码格式化:shift + alt + f
上下移动一行:alt + up、alt + down
向上向下复制一行:shift + alt + up、shift + alt + down
在当前行下方插入一行:ctrl + enter
在当前行上方插入一行:ctrl + shift + enter
显示:
侧边栏显示 / 隐藏:ctrl + b
显示左侧资源管理器:ctrl + shift + e
显示左侧搜索:ctrl + shift + f
显示右侧下方的控制台-debug:ctrl + shift + d
显示右侧下方的控制台-问题:ctrl + shift + m
显示右侧下方的控制台-终端:ctrl + ~
自动换行:alt + z
字体放大 / 缩小:ctrl + ( + 或 - )
光标:
选中相同单词:ctrl + d,跳过 ctrl + k
光标选中文字:shift + left / right / up / down
选中当前行:ctrl + i
删除:
删除一行:ctrl + shift + k
注释:
当行注释:ctrl + /
多行注释:alt + shift + a
html 页面在浏览器打开:ctrl + f1
sftp:
{
"protocol": "sftp",
"uploadOnSave": false,
"ignore": [
".vscode",
".git",
".DS_Store"
],
"watcher": {
"files": "**/*",
"autoUpload": false,
"autoDelete": false
},
"host": " ",
"username": "root",
"password": " ",
"port": 22,
"remotePath": " " // 服务器对应项目文件根目录
}
ts 自动编译为 js:
原文:https://www.cnblogs.com/EnSnail/p/10227479.html