学习笔记-VSCode-基础-1

给时间以信心!

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
显示 DebugCtrl+Shift+D
显示 OutputCtrl+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

在这里插入图片描述

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

风音素

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值