vscode配置User Settings

{
  "csharp.format.enable": false,
  "workbench.colorTheme": "One Dark Pro", //主题
  "editor.fontFamily": "Fira Code", //设置Fira code
  "editor.fontLigatures": true, //设置Fira code
  "editor.fontSize": 14, //设置文字大小
  "editor.lineHeight": 17, //设置文字行高
  "editor.fontWeight": "300", // Light
  "files.autoSave": "afterDelay", //打开自动保存
  "git.ignoreMissingGitWarning": true,
  // "team.showWelcomeMessage": false,
  "editor.minimap.enabled": false, //关闭快速预览
  "python.pythonPath": "D:\\Anaconda3\\python.exe",
  "python.formatting.provider": "yapf",
  "python.linting.flake8Enabled": true,
  "python.linting.pylintArgs": [
    "--disable=W,C,E"
  ],
  // "emmet.includeLanguages": {
  //     "javascript":"javascriptreact"
  // },
  //"vim.useCtrlKeys": false,
  //Setting VIm
  "vim.easymotion": true,
  "vim.sneak": true,
  "vim.incsearch": true,
  "vim.useSystemClipboard": true,
  "vim.useCtrlKeys": true,
  "vim.hlsearch": true,
  "vim.insertModeKeyBindings": [
    {
      "before": [
        "j",
        "j"
      ],
      "after": [
        "<Esc>"
      ]
    }
  ],
  "vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": [
        "<leader>",
        "d"
      ],
      "after": [
        "d",
        "d"
      ]
    },
    {
      "before": [
        "<C-n>"
      ],
      "commands": [
        ":nohl"
      ]
    }
  ],
  "vim.leader": "<space>",
  "vim.handleKeys": {
    "<C-a>": false,
    "<C-f>": false,
    "<C-b>": false
  },
  // // Format a file on save.
  // // A formatter must be available,
  // // the file must not be auto-saved,
  // // and editor must not be shutting down.
  "editor.formatOnSave": true, //每次保存自动格式化
  "eslint.autoFixOnSave": true, // 每次保存的时候将代码按eslint格式进行修复
  // 添加 vue 支持
  "eslint.validate": [
    "javascript",
    {
      "language": "vue",
      "autoFix": true
    },
    "html",
    "vue"
  ],
  "prettier.eslintIntegration": true, //让prettier使用eslint的代码格式进行校验
  "prettier.singleQuote": true, //使用带引号替代双引号
  "prettier.semi": false, //去掉代码结尾的分号
  "javascript.format.insertSpaceBeforeFunctionParenthesis": true, //让函数(名)和后面的括号之间加个空格
  "files.associations": {
    ".eslintrc.js": "javascript",
    "*.js": "javascriptreact",
    "*.vue": "vue"
  },
  "emmet.syntaxProfiles": {
    "vue-html": "html",
    "vue": "html"
  },
  "fileheader.Author": "iboxwork",
  "fileheader.LastModifiedBy": "okokyu",
  "vetur.format.defaultFormatter.html": "js-beautify-html", // 使用插件格式化 html
  "vetur.format.defaultFormatter.js": "vscode-typescript", //让vue中的js按编辑器自带的ts格式进行格式化
  "vetur.format.defaultFormatterOptions": {
    "js-beautify-html": {
      // 属性强制折行对齐
      "wrap_attributes": "force-aligned"
    }
  },
  "vetur.validation.template": true,
  // Configure glob patterns for excluding files and folders.
  "files.exclude": {
    "**/.git": true,
    "**/.DS_Store": true,
    "**/*.meta": true,
    "**/*.*.meta": true,
    "**/*.unity": true,
    "**/*.unityproj": true,
    "**/*.mat": true,
    "**/*.fbx": true,
    "**/*.FBX": true,
    "**/*.tga": true,
    "**/*.cubemap": true,
    "**/*.prefab": true,
    "**/Library": true,
    "**/ProjectSettings": true,
    "**/Temp": true
  },
  //git 配置
  "git.path": "C:\\Program Files\\Git\\bin\\git.exe",
  "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
  "workbench.sideBar.location": "left",
  "window.zoomLevel": 0,
  "dart.flutterSdkPath": "D:\\flutter\\bin",
  "[dart]": {},
  "explorer.confirmDragAndDrop": false,
  "C_Cpp.updateChannel": "Insiders",
  "git.enableSmartCommit": true,
  "git.autofetch": true,
  "terminal.integrated.inheritEnv": false,
  "dart.openDevTools": "flutter",
  "breadcrumbs.enabled": true,
  "editor.renderWhitespace": "all",
  "editor.renderControlCharacters": true,
  "workbench.activityBar.visible": false
  // "terminal.integrated.shell.windows": "C:\\Windows\\System32\\bash.exe"
}

 

  • 3
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
好的,以下是针对VSCodesettings.json配置文件的中文回答: 在VSCode中,你可以通过打开命令面板(使用快捷键Ctrl+Shift+P或Cmd+Shift+P)并搜索“Preferences: Open User Settings”来打开用户设置。这将打开两个文件:settings.json和keybindings.json。 在这里,我将讨论settings.json,它是一个JSON格式的文件,包含VSCode的各种设置选项。以下是一些可能会对你有用的常见配置选项: 1. 设置默认终端:你可以使用“terminal.integrated.shell.windows”或“terminal.integrated.shell.osx”选项来设置默认终端。例如,如果你想使用PowerShell作为默认终端,可以将“terminal.integrated.shell.windows”设置为PowerShell的路径。 2. 设置字体大小和家族:你可以使用“editor.fontSize”和“editor.fontFamily”选项来设置字体大小和家族。例如,如果你想使用14号字体并且家族是Consolas,你可以将“editor.fontSize”设置为14,“editor.fontFamily”设置为“Consolas”。 3. 设置文件自动 settings.json 文件可以用来定义 VS Code 的用户和工作区设置,以及用来定义拓展和语言服务器的配置选项。当你在使用VSCode时,可以通过更改`settings.json`文件来自定义编辑器的行为。以下是一些常见的`settings.json`配置示例: 1. 更改字体大小: ``` "editor.fontSize": 16 ``` 2. 显示行号: ``` "editor.lineNumbers": "on" ``` 3. 自动保存: ``` "files.autoSave": "onFocusChange" ``` 4. 代码自动缩进: ``` "editor.tabSize": 4, "editor.insertSpaces": true ``` 5. 隐藏侧边栏: ``` "workbench.sideBar.visible": false ``` 6. 更改主题: ``` "workbench.colorTheme": "Default Light+" ``` 可以通过以下步骤打开`settings.json`文件: 1. 打开VSCode 2. 在菜单栏中,选择“文件” -> “首选项” -> “设置”(或者使用快捷键“Ctrl + ,”) 3. 在“用户设置”和“工作区设置”之间选择一个选项卡,以决定要更改的设置是全局设置还是当前工作区的设置。 4. 在“搜索设置”框中输入要更改的设置,然后按Enter。 5. 单击“编辑”图标(一个笔)以编辑`settings.json`文件。 在此文件中,你可以添加、更改或删除特定的设置,并保存更改。保存后,你的更改将立即生效。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值