vscode: Visual Studio Code 常用快捷键
官方快捷键说明:Key Bindings for Visual Studio Code
F1
Ctrl+Shift+P
: 打开命令面板。在打开的输入框内,可以输入任何命令,例如:
Backspace
Ctrl+P
Ctrl+P
>
Ctrl+Shift+P
Ctrl+P
- 直接输入文件名,跳转到文件
?
!
Errors
Warnings
Ctrl+Shift+M
:
Ctrl+G
@
symbol
Ctrl+Shift+O
@
symbol
Ctrl+Shift+O
#
symbol
Ctrl+T
Ctrl+Shift+N
Ctrl+Shift+W
- 同时打开多个编辑器(查看多个文件)
Ctrl+N
Ctrl+Tab
3
Ctrl+\
Ctrl
Explorer
3
Ctrl+1
Ctrl+2
Ctrl+3
3
Ctrl+
Ctrl+k
Left
Right
格式调整
Ctrl+[
Ctrl+]
Ctrl+C
Ctrl+V
Shift+Alt+F
Ctrl+Shift+P
format code
Alt+Up
Alt+Down
Shift+Alt+Up
Shift+Alt+Down
Ctrl+Enter
Ctrl+Shift+Enter
光标相关
Home
End
Ctrl+End
Ctrl+Home
F12
Alt+F12
Ctrl+Shift+]
Shift+End
Shift+Home
Ctrl+Delete
Shift+Alt+Left
Shift+Alt+Right
- 多行编辑(列编辑):
Alt+Shift+鼠标左键
,Ctrl+Alt+Down/Up
Ctrl+Shift+L
Ctrl+D
Ctrl+Shift+K
Ctrl+U
重构代码
Shift+F12
Ctrl+F12
F2
,输入新的名字,回车,会发现所有的文件都修改了Error
Warning
F8
diff
explorer
Set file to compare
Compare with file_name_you_chose
查找替换
Ctrl+F
Ctrl+H
Ctrl+Shift+F
- 全屏:
F11
- zoomIn/zoomOut:
Ctrl +/-
- 侧边栏显/隐:
Ctrl+B
Ctrl+Shift+E
Ctrl+Shift+F
Ctrl+Shift+G
Ctrl+Shift+D
Ctrl+Shift+U
- 自动保存:
File -> AutoSave
Ctrl+Shift+P
auto
打开默认键盘快捷方式设置:File -> Preferences -> Keyboard Shortcuts
,或者:Alt+F -> p -> k
keybindings.json
:
// Place your key bindings in this file to overwrite the defaults [ // ctrl+space 被切换输入法快捷键占用 { "key": "ctrl+alt+space", "command": "editor.action.triggerSuggest", "when": "editorTextFocus" }, // ctrl+d 删除一行 { "key": "ctrl+d", "command": "editor.action.deleteLines", "when": "editorTextFocus" }, // 与删除一行的快捷键互换 { "key": "ctrl+shift+k", "command": "editor.action.addSelectionToNextFindMatch", "when": "editorFocus" }, // ctrl+shift+/多行注释 { "key":"ctrl+shift+/", "command": "editor.action.blockComment", "when": "editorTextFocus" }, // 定制与 sublime 相同的大小写转换快捷键,需安装 TextTransform 插件 { "key": "ctrl+k ctrl+u", "command": "uppercase", "when": "editorTextFocus" }, { "key": "ctrl+k ctrl+l", "command": "lowercase", "when": "editorTextFocus" } ]
- PostCSS Sorting
- stylelint
- stylefmt
- ESLint
- javascript standard format
- beautify
- Babel ES6/ES7
- Debugger for Chrome
- Add jsdoc comments
- javascript(ES6) code snippets
- vue
- weex
- Reactjs code snippets
- React Native Tools
- Npm Intellisense
- Instant Markdown
- Markdown Shortcuts
- TextTransform
vscode 自定义配置参考:
{ "editor.fontSize": 18, "files.associations": { "*.es": "javascript", "*.es6": "javascript" }, // 控制编辑器是否应呈现空白字符 "editor.renderWhitespace": true, // 启用后,将在保存文件时剪裁尾随空格。 "files.trimTrailingWhitespace": true, // File extensions that can be beautified as javascript or JSON. "beautify.JSfiles": [ "", "es", "es6", "js", "json", "jsbeautifyrc", "jshintrc" ] }
文章来源: https://blog.csdn.net/u012282382/article/details/86635957