vs code settings

settings.json (ctrl+,)

安装Jetbrains Mono Microsoft Yahei UI字体,Darcula Theme主题,vscode-iconsvim插件

{
    "workbench.iconTheme": "vscode-icons",
    "workbench.colorTheme": "Darcula",

    "editor.fontFamily": "'Jetbrains Mono', 'Microsoft Yahei UI', 'Fira Code'",
    "editor.fontSize": 13,
    "editor.fontLigatures": true,
    "editor.fontWeight": "400",
    "editor.lineHeight": 20,

    "vim.handleKeys": {
        "<C-a>": false,
        "<C-f>": false,
        "<C-k>": false,
        "<C-s>": false,
        "<C-p>": false,
        "<C-n>": false
    },
    "vim.useSystemClipboard": true
}

keybindings.json (ctrl+k, ctrl+s)

我习惯在vim的输入模式使用alt+hjkl控制光标移动。如果直接在快捷键设置页修改,打开beybindings.json可看到添加了新组合键并禁用了原组合键,实际可以无需禁用原组合键(即可以多个组合键对应同一功能):

// Place your key bindings in this file to override the defaultsauto[]
[
    {
        "key": "alt+l",
        "command": "cursorRight",
        "when": "textInputFocus"
    },
    {
        "key": "alt+h",
        "command": "cursorLeft",
        "when": "textInputFocus"
    },
    {
        "key": "alt+j",
        "command": "cursorDown",
        "when": "textInputFocus"
    },
    {
        "key": "alt+k",
        "command": "cursorUp",
        "when": "textInputFocus"
    }
]

将vscode加入右键菜单

相应.reg文件内容:

  • 空白处右键显示“Open with Code”
Windows Registry Editor Version 5.00
 
[HKEY_CLASSES_ROOTDirectoryBackgroundshellVSCode]
@="Open with Code"
"Icon"="D:\Program Files\VSCode\Code.exe"
 
[HKEY_CLASSES_ROOTDirectoryBackgroundshellVSCodecommand]
@=""D:\Program Files\VSCode\Code.exe" "%V""
  • 文件右键显示“Open with Code”
Windows Registry Editor Version 5.00
 
[HKEY_CLASSES_ROOT*shellVSCode]
@="Open with Code"
"Icon"="D:\Program Files\VSCode\Code.exe"
 
[HKEY_CLASSES_ROOT*shellVSCodecommand]
@=""D:\Program Files\VSCode\Code.exe" "%1""
  • 文件夹右键显示“Open with Code”
Windows Registry Editor Version 5.00
 
[HKEY_CLASSES_ROOTDirectoryshellVSCode]
@="Open with Code"
"Icon"="D:\Program Files\VSCode\Code.exe"
 
[HKEY_CLASSES_ROOTDirectoryshellVSCodecommand]
@=""D:\Program Files\VSCode\Code.exe" "%V""

其他插件:

  • Better PageUp / PageDown (russelldavis.better-pageup-pagedown)
  • Bracket Pair Colorizer (coenraads.bracket-pair-colorizer)

VsCode写Python代码
python注释的几种风格

原文地址:https://www.cnblogs.com/dylanchu/p/12235958.html