vscode: Visual Studio Code 常用快捷键
官方快捷键说明:Key Bindings for Visual Studio Code
F1Ctrl+Shift+P: 打开命令面板。在打开的输入框内,可以输入任何命令,例如:
BackspaceCtrl+PCtrl+P>Ctrl+Shift+P
Ctrl+P
- 直接输入文件名,跳转到文件
?!ErrorsWarningsCtrl+Shift+M:Ctrl+G@symbolCtrl+Shift+O@symbolCtrl+Shift+O#symbolCtrl+T
Ctrl+Shift+NCtrl+Shift+W- 同时打开多个编辑器(查看多个文件)
Ctrl+NCtrl+Tab3Ctrl+\CtrlExplorer3Ctrl+1Ctrl+2Ctrl+33Ctrl+Ctrl+kLeftRight
格式调整
Ctrl+[Ctrl+]Ctrl+CCtrl+VShift+Alt+FCtrl+Shift+Pformat codeAlt+UpAlt+DownShift+Alt+UpShift+Alt+DownCtrl+EnterCtrl+Shift+Enter
光标相关
HomeEndCtrl+EndCtrl+HomeF12Alt+F12Ctrl+Shift+]Shift+EndShift+HomeCtrl+DeleteShift+Alt+LeftShift+Alt+Right- 多行编辑(列编辑):
Alt+Shift+鼠标左键,Ctrl+Alt+Down/Up Ctrl+Shift+LCtrl+DCtrl+Shift+KCtrl+U
重构代码
Shift+F12Ctrl+F12F2,输入新的名字,回车,会发现所有的文件都修改了ErrorWarningF8diffexplorerSet file to compareCompare with file_name_you_chose
查找替换
Ctrl+FCtrl+HCtrl+Shift+F
- 全屏:
F11 - zoomIn/zoomOut:
Ctrl +/- - 侧边栏显/隐:
Ctrl+B Ctrl+Shift+ECtrl+Shift+FCtrl+Shift+GCtrl+Shift+DCtrl+Shift+U
- 自动保存:
File -> AutoSaveCtrl+Shift+Pauto
打开默认键盘快捷方式设置: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