Tools - Visual Studio Code

FEHub

快捷键约定

Cmd –> Command

功能WindowsmacOS
打开文件Ctrl+oCmd+o
打开文件夹Ctrl+k Ctrl+o 
关闭文件夹Ctrl+k f 
命令面板Ctrl+Shift+pCmd+Shift+p
资源管理器Ctrl+Shift+e 
全局搜索Ctrl+Shift+fCmd+Shift+f
按名称搜索文件Ctrl+pCmd+p
GitCtrl+Shift+g 
调试Ctrl+Shift+dCmd+Shift+d
插件Ctrl+Shift+xCmd+Shift+x
Markdown 侧边预览Ctrl+k vCmd+k v
Markdown 预览Ctrl+Shift+vCmd+Shift+v

使用 VSCode 作为 mergetool

编辑 ~/.gitconfig 文件,添加如下内容:

[merge]
    tool = vscode
[mergetool "vscode"]
    cmd = code --wait $MERGED

需要的时候执行 git mergetool 就会调起了。

参考:https://blog.kulman.sk/using-vscode-as-git-merge-tool/

VSCodeVim 支持按键重复

在 macOS,默认情况 VSCodeVim 模式下是不支持按键重复的,比如你在 Normal 模式下长按 L,结果光标只向右移动了一次,而没有像你预期的那样一直移动。

启用按键重复的方法在插件的 REAME 有说明,链接:https://github.com/VSCodeVim/Vim#mac

方法:

按需执行下面的某一行命令并重启 VSCode。

$ defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false         # For VS Code
$ defaults write com.microsoft.VSCodeInsiders ApplePressAndHoldEnabled -bool false # For VS Code Insider
$ defaults write com.visualstudio.code.oss ApplePressAndHoldEnabled -bool false    # For VS Codium
$ defaults delete -g ApplePressAndHoldEnabled                                      # If necessary, reset global default

如果有需要,调整「系统偏好设置」—「键盘」里的「按键重复」和「重复前延迟」。

Search

    Table of Contents