VisualStudioCode常用快捷键,visualstudiocode
分享于 点击 9874 次 点评:283
VisualStudioCode常用快捷键,visualstudiocode
vscode: Visual Studio Code 常用快捷键
原文章地址: vscode: Visual Studio Code 常用快捷键
官方快捷键说明:Key Bindings for Visual Studio Code
主命令框
使用vscode的过程中,我们可能会用到终端,
虽然系统自带有,但是还要另外打开,有点不方便,vscode中就有这个功能,
打开方法
1. 使用快捷键: ctrl + · 即可;注意那个点是键盘上 esc 下面的那个点;
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
常用快捷键
编辑器与窗口管理
代码编辑
格式调整
光标相关
重构代码
查找替换
显示相关
其他
- 自动保存:
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"
]
}
相关文章
- 暂无相关文章
用户点评