Vs code 配置

Mac:

settings.json

{
"editor.mouseWheelZoom": true, //可以按着ctrl 加滚轮 缩放窗口字体大小
"workbench.colorTheme": "Monokai Dimmed",
"editor.wordWrap": "on", //软换行
"explorer.openEditors.visible": 1,
"window.zoomLevel": 0,
"diffEditor.ignoreTrimWhitespace": false,
"editor.renderLineHighlight": "gutter", // 在“打开的编辑器”窗格中显示的编辑器数量。
// eslint相关 start--------
"editor.formatOnSave": false, // 必须关闭vs code 的默认保存格式化
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true // 用项目的eslint规则 格式化代码
},
"eslint.validate": [
"javascript",
"vue",
"html",
"css"
],
"editor.detectIndentation": false,
"vetur.format.defaultFormatter.html": "none",
"vetur.format.defaultFormatter.js": "none",
"vetur.format.options.tabSize": 4,
"workbench.iconTheme": "material-icon-theme",
// eslint相关结束 end------
}

keybindings.json

[
    {
        "key": "alt+cmd+s",
        "command": "workbench.action.files.save"
    },
    {
        "key": "cmd+s",
        "command": "-workbench.action.files.save"
    },
    {
        "key": "cmd+s",
        "command": "workbench.action.files.saveAll"
    },
    {
        "key": "alt+cmd+s",
        "command": "-workbench.action.files.saveAll"
    },
    {
        "key": "shift+alt+down",
        "command": "editor.action.addSelectionToNextFindMatch",
        "when": "editorFocus"
    },
    {
        "key": "cmd+d",
        "command": "-editor.action.addSelectionToNextFindMatch",
        "when": "editorFocus"
    },
    {
        "key": "cmd+d",
        "command": "editor.action.copyLinesDownAction",
        "when": "editorTextFocus && !editorReadonly"
    },
    {
        "key": "shift+alt+down",
        "command": "-editor.action.copyLinesDownAction",
        "when": "editorTextFocus && !editorReadonly"
    },
    {
        "key": "shift+enter",
        "command": "editor.action.insertLineAfter",
        "when": "editorTextFocus && !editorReadonly"
    },
    {
        "key": "cmd+enter",
        "command": "-editor.action.insertLineAfter",
        "when": "editorTextFocus && !editorReadonly"
    }
]

Plugins

Win:

keybindings.json

// 将键绑定放在此文件中以覆盖默认值auto[]
[
  {
    "key": "win+oem_3", //```
    "command": "workbench.action.terminal.toggleTerminal"
  },
  {
    "key": "ctrl+oem_3",
    "command": "-workbench.action.terminal.toggleTerminal"
  },
  {
    "key": "ctrl+alt+f",
    "command": "editor.action.startFindReplaceAction"
  },
  {
    "key": "ctrl+h",
    "command": "-editor.action.startFindReplaceAction"
  },
  {
    "key": "ctrl+d",
    "command": "editor.action.copyLinesDownAction",
    "when": "editorTextFocus && !editorReadonly"
  },
  {
    "key": "shift+alt+down",
    "command": "-editor.action.copyLinesDownAction",
    "when": "editorTextFocus && !editorReadonly"
  },
  {
    "key": "shift+enter",
    "command": "editor.action.insertLineAfter",
    "when": "editorTextFocus && !editorReadonly"
  },
  {
    "key": "ctrl+enter",
    "command": "-editor.action.insertLineAfter",
    "when": "editorTextFocus && !editorReadonly"
  }
]
posted @ 2020-09-23 13:53  Sugеr  阅读(103)  评论(0)    收藏  举报