Mac上的VSCode学习--常用快捷键

vscode 终端

快捷键 事件
control + 反引号(键盘左上) 调出终端or隐藏终端
control + shift + 反引号(键盘左上) 新建集成终端
control + A 回到行首
option + left/right 以单词为单位移动
command + left/right 回到行首或行尾
command + F 搜索框
command + K 清除输出结果

vscode 代码区

快捷键 事件
option + left/right 一单词为单位移动
command + left/right 回到行首或行尾
command + top/bottom 回到首行或者末行
command + shift + \ 在花括号{}之间移动
option + shift + left/right 选中当前单词开头/结尾到光标之间的所有字符
command + shift + left/right 选中当前行开头/结尾到光标之间的所有字符
command + shift + top/bottom 选中首行/末行到光标之间的所有字符
command + shift + P 打开命令面板
command + delete 删除当前行光标左侧所有内容
command + delete + fn 删除当前行光标右侧所有内容
option + delete 删除当前光标前的单词
option + delete + fn 删除当前光标后的单词
command + shift + K 删除当前行代码
command + X 剪切当前行代码
command + shift + enter 在当前行的上面开始一行
option + top/bottom 上下行代码交换位置
option + shift + top/bottom 复制当前行或者已选中行到当前行下边
option + shift + F 格式化代码
command + K command + F 选中的代码格式化
control + T 光标左右字符调换位置
control + J 两行合并成一行
command + U 撤销一次光标的移动
option + B .html文件在浏览器中打开(需要安装open in browser插件)

自定义快捷键

方法:打开命令面板(command + shift + p),搜索‘打开键盘快捷方式(open Keyboard Shortcuts)’,
搜索想要绑定的事件,输入你想用的快捷键后,按下enter即可。(注意不要与已有快捷键发生冲突)

快捷键 事件
command + shift + ] 选中括号内所有内容
command + shift + i 选中行进行缩进
control + u 选中部分大写
control + l 选中部分小写
posted @ 2018-11-15 00:12  白白白白白白白  阅读(3961)  评论(0编辑  收藏  举报