✍ 给时间以信心!
文章目录
VSCode
快捷键
修改**keybindings.json
**
- 快捷键Ctrl+p搜索
- 或文件->首选项->键盘快捷键->
- 再或者在地址中打开
移动,删除,聚焦「Button Version」
[
// 光标上下左右移动
{
"key": "alt+i",
"command": "cursorUp"
},
{
"key": "alt+j",
"command": "cursorLeft"
},
{
"key": "alt+l",
"command": "cursorRight"
},
{
"key": "alt+k",
"command": "cursorDown"
},
// 光标移至行尾
{
"key": "alt+o",
"command": "cursorEnd",
},
// 光标移至行首
{
"key": "alt+u",
"command": "cursorHome",
},
// 整行上移下移
{
"key": "ctrl+i",
"command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
// 整行下移
{
"key": "ctrl+k",
"command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
// 向上选中
{
"key": "shift+alt+i",
"command": "cursorUpSelect",
"when": "textInputFocus"
},
// 向下选中
{
"key": "shift+alt+k",
"command": "cursorDownSelect",
"when": "textInputFocus"
},
// 向左选中
{
"key": "shift+alt+j",
"command": "cursorLeftSelect",
"when": "textInputFocus"
},
// 向右选中
{
"key": "shift+alt+l",
"command": "cursorRightSelect",
"when": "textInputFocus"
},
//从当前到行首选中
{
"key": "shift+alt+u",
"command": "cursorHomeSelect",
"when": "textInputFocus"
},
//从当前到行尾选中
{
"key": "shift+alt+o",
"command": "cursorEndSelect",
"when": "textInputFocus"
},
//提示上下选择
{
"key": "alt+i",
"command": "selectPrevSuggestion",
"when": "editorTextFocus && suggestWidgetVisible"
},
{
"key": "alt+k",
"command": "selectNextSuggestion",
"when": "editorTextFocus && suggestWidgetVisible"
},
// 匹配相同的下一个
{
"key": "ctrl+2",
"command": "editor.action.addSelectionToNextFindMatch",
"when": "editorFocus"
},
//删除当前行
{
"key": "ctrl+d",
"command": "-editor.action.addSelectionToNextFindMatch",
"when": "editorFocus"
},
{
"key": "ctrl+d",
"command": "editor.action.deleteLines",
"when": "textInputFocus && !editorReadonly"
},
]
热键「Hot keys」
释义 | 快捷键 |
---|---|
新建文件 | Ctrl+N |
文件之间切换 | Ctrl+Tab |
打开一个新的VS Code编辑器 | Ctrl+Shift+N |
关闭当前窗口 | Ctrl+W |
移动到文件结尾 | Ctrl+End |
移动到文件开头 | Ctrl+Home |
移动到定义处 | F12 |
查看定义处缩略图 | Alt+F12 |
回退上一个光标操作 | Ctrl+U |
显示 Debug | Ctrl+Shift+D |
显示 Output | Ctrl+Shift+U |
侧边栏显示或隐藏 | Ctrl+B |
放大或缩小(以编辑器左上角为基准) | Ctrl +/- |
跳转到行数 | Ctrl+G |
快速打开文件「Quick Open」
可以用于快速搜索,然后打开项目中的文件,当你想在一个大型项目中打开某一个代码文件时,此方法非常实用。
Mac:
Command
+P
Linux/Windows:Ctrl
+P
编辑器命令「Command Palette」
在搜索加上>
前缀就可以调用命令了。编辑器的命令可以做很多,可以快速搜索快捷键,还可以执行插件的一些命令,非常实用哦!
Mac:
Command
+P
Linux/Windows:Ctrl
+P
编辑器网格布局「Editor Grid Layout」
光标拖动标签页到希望的对应位置即可
拆分编辑器「Split Editor」
类型 | 按键 |
---|---|
自定义键 | Ctrl+Shift+/ |
在一个文件中,代码会非常的长,把当前文件在同一个编辑器拆分开,然后分别滑动到脚本部分就可以同时更改了。
优秀插件
Material Icon Theme
: You can change the color of the default folder icon using the command palette:
Prettify JSON
Tabnine Autocomplete AI
: JavaScript, Python, TypeScript, PHP, C/C++, HTML/CSS, Go, Java, Ruby, C#, Rust, SQL, Bash, Kotlin,
Chinese (Simplified)
Code Spell Checker
Better Comments
: The Better Comments extension will help you create more human-friendly comments in your code.
With this extension, you will be able to categorise your annotations into:
- Alerts
- Queries
- TODOs
- Highlights
- Commented out code can also be styled to make it clear the code shouldn’t be there
- Any other comment styles you’d like can be specified in the setting