zoukankan      html  css  js  c++  java
  • vscode 常用配置

      1 // 通过将设置放入设置文件中来覆盖设置。
      2 {
      3 
      4     //-------- 编辑器配置 --------
      5 
      6     // 控制字体系列。
      7     "editor.fontFamily": "Consolas, 'Courier New', monospace",
      8 
      9     // 控制字体大小。
     10     "editor.fontSize": 14,
     11 
     12     // 控制行高。
     13     "editor.lineHeight": 0,
     14 
     15     // 控制行号的可见性
     16     "editor.lineNumbers": true,
     17 
     18     // 控制字形边距的可见性
     19     "editor.glyphMargin": false,
     20 
     21     // 显示垂直标尺的列
     22     "editor.rulers": [],
     23 
     24     // 执行文字相关的导航或操作时将用作文字分隔符的字符
     25     "editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\|;:'",.<>/?",
     26 
     27     // 一个制表符等于的空格数。
     28     "editor.tabSize": 4,
     29 
     30     // 按 "Tab" 时插入空格。
     31     "editor.insertSpaces": true,
     32 
     33     // 当打开文件时,将基于文件内容检测 "editor.tabSize" 和 "editor.insertSpaces"。
     34     "editor.detectIndentation": true,
     35 
     36     // 控制选取范围是否有圆角
     37     "editor.roundedSelection": true,
     38 
     39     // 控制编辑器是否可以滚动到最后一行之后
     40     "editor.scrollBeyondLastLine": true,
     41 
     42     // 控制在多少个字符后编辑器会自动换到下一行。将其设置为 0 则将打开视区宽度换行(自动换行)。将其设置为 -1 则将强制编辑器始终不换行。
     43     "editor.wrappingColumn": 300,
     44 
     45     // 控制换行的行的缩进。可以是"none"、 "same" 或 "indent"。
     46     "editor.wrappingIndent": "same",
     47 
     48     // 要对鼠标滚轮滚动事件的 "deltaX" 和 "deltaY" 使用的乘数 
     49     "editor.mouseWheelScrollSensitivity": 1,
     50 
     51     // 控制键入时是否应显示快速建议
     52     "editor.quickSuggestions": true,
     53 
     54     // 控制延迟多少毫秒后将显示快速建议
     55     "editor.quickSuggestionsDelay": 10,
     56 
     57     // 控制编辑器是否应该在左括号后自动插入右括号
     58     "editor.autoClosingBrackets": true,
     59 
     60     // 控制编辑器是否应在键入后自动设置行的格式
     61     "editor.formatOnType": false,
     62 
     63     // 控制键入触发器字符时是否应自动显示建议
     64     "editor.suggestOnTriggerCharacters": true,
     65 
     66     // 控制除了 "Tab" 以外,是否还应在 "Enter" 时接受建议。帮助避免“插入新行”或“接受建议”之间的歧义。
     67     "editor.acceptSuggestionOnEnter": true,
     68 
     69     // 控制编辑器是否应突出显示选项的近似匹配
     70     "editor.selectionHighlight": true,
     71 
     72     // 控制可在概述标尺同一位置显示的效果数量
     73     "editor.overviewRulerLanes": 3,
     74 
     75     // 控制光标闪烁动画,接受的值为'blink'、'visible' 和 'hidden'
     76     "editor.cursorBlinking": "blink",
     77 
     78     // 控制光标样式,接受的值为 'block' 和 'line'
     79     "editor.cursorStyle": "line",
     80 
     81     // 启用字体连字
     82     "editor.fontLigatures": false,
     83 
     84     // 控制光标是否应隐藏在概述标尺中。
     85     "editor.hideCursorInOverviewRuler": false,
     86 
     87     // 控制编辑器是否应呈现空白字符
     88     "editor.renderWhitespace": false,
     89 
     90     // 控制编辑器是否显示支持它的模式的参考信息
     91     "editor.referenceInfos": true,
     92 
     93     // 控制编辑器是否启用代码折叠功能
     94     "editor.folding": true,
     95 
     96     // 在制表位后插入和删除空格
     97     "editor.useTabStops": true,
     98 
     99     // 删除尾随自动插入的空格
    100     "editor.trimAutoWhitespace": true,
    101 
    102     // Keep peek editors open even when double clicking their content or when hitting Escape.
    103     "editor.stablePeek": false,
    104 
    105     // 控制 Diff 编辑器以并排或内联形式显示差异
    106     "diffEditor.renderSideBySide": true,
    107 
    108     // 控制差异编辑器是否将对前导空格或尾随空格的更改显示为差异
    109     "diffEditor.ignoreTrimWhitespace": true,
    110 
    111 
    112     //-------- 窗口配置 --------
    113 
    114     // 启用后,将在新窗口中打开文件,而不是重复使用现有实例。
    115     "window.openFilesInNewWindow": true,
    116 
    117     // 控制重启后重新打开文件夹的方式。选择“none”表示永不重新打开文件夹,选择“one”表示重新打开最后使用的一个文件夹,或选择“all”表示打开上次会话的所有文件夹。
    118     "window.reopenFolders": "one",
    119 
    120     // 调整窗口的缩放级别。原始大小是 0,每次递增(例如 1)或递减(例如 -1)表示放大或缩小 20%。也可以输入小数以便以更精细的粒度调整缩放级别。
    121     "window.zoomLevel": 0,
    122 
    123 
    124     //-------- 文件配置 --------
    125 
    126     // 配置 glob 模式以排除文件和文件夹。
    127     "files.exclude": {
    128         "**/.git": true,
    129         "**/.svn": true,
    130         "**/.DS_Store": true
    131     },
    132 
    133     // 配置语言的文件关联(如: "*.extension": "html")。这些关联的优先级高于已安装语言的默认关联。
    134     "files.associations": {},
    135 
    136     // 读取和编写文件时将使用的默认字符集编码。
    137     "files.encoding": "utf8",
    138 
    139     // 默认行尾字符。
    140     "files.eol": "
    ",
    141 
    142     // 启用后,将在保存文件时剪裁尾随空格。
    143     "files.trimTrailingWhitespace": false,
    144 
    145     // 控制已更新文件的自动保存。接受的值:“off”、“afterDelay”、“onFocusChange”。如果设置为“afterDelay”,则可在 "files.autoSaveDelay" 中配置延迟。
    146     "files.autoSave": "off",
    147 
    148     // 控制延迟(以秒为单位),在该延迟后将自动保存更新后的文件。仅在 "files.autoSave" 设置为“afterDelay”时适用。
    149     "files.autoSaveDelay": 1000,
    150 
    151     // 配置文件路径的 glob 模式以从文件监视排除。更改此设置要求重启。如果在启动时遇到 Code 消耗大量 CPU 时间,则可以排除大型文件夹以减少初始加载。
    152     "files.watcherExclude": {
    153         "**/.git/objects/**": true
    154     },
    155 
    156 
    157     //-------- Emmet 配置 --------
    158 
    159     // 启用后,按 TAB 键时,将展开 Emmet 缩写。
    160     "emmet.triggerExpansionOnTab": true,
    161 
    162 
    163     //-------- 文件资源管理器配置 --------
    164 
    165     // 在滚动条出现之前将显示的最大工作文件数目。
    166     "explorer.workingFiles.maxVisible": 9,
    167 
    168     // 控制工作文件部分的高度是否应动态适应元素数量。
    169     "explorer.workingFiles.dynamicHeight": true,
    170 
    171     // 控制资源管理器是否应在打开文件时自动显示它们。
    172     "explorer.autoReveal": true,
    173 
    174 
    175     //-------- HTTP 配置 --------
    176 
    177     // 要使用的代理设置。如果尚未设置,则将从 http_proxy 和 https_proxy 环境变量获取
    178     "http.proxy": "",
    179 
    180     // 是否应根据提供的 CA 列表验证代理服务器证书。
    181     "http.proxyStrictSSL": true,
    182 
    183 
    184     //-------- 搜索配置 --------
    185 
    186     // 配置 glob 模式以在搜索中排除文件和文件夹。从 files.exclude 设置中继承所有 glob 模式。
    187     "search.exclude": {
    188         "**/node_modules": true,
    189         "**/bower_components": true
    190     },
    191 
    192 
    193     //-------- 更新配置 --------
    194 
    195     // 配置从中接收更新的更新频道。更改后需要重启。
    196     "update.channel": "default",
    197 
    198 
    199     //-------- GIT 配置 --------
    200 
    201     // 是否启用了 GIT
    202     "git.enabled": true,
    203 
    204     // 可执行 GIT 的路径
    205     "git.path": null,
    206 
    207     // 是否启用了自动提取。
    208     "git.autofetch": true,
    209 
    210 
    211     //-------- 标记预览配置 --------
    212 
    213     // 标记预览中供使用的 CSS 样式表的 URL 或本地路径列表。
    214     "markdown.styles": [],
    215 
    216 
    217     //-------- JSON configuration --------
    218 
    219     // Associate schemas to JSON files in the current project
    220     "json.schemas": [],
    221 
    222 
    223     //-------- 遥测配置 --------
    224 
    225     // 启用要发送给 Microsoft 的使用情况数据和错误。
    226     "telemetry.enableTelemetry": true,
    227 
    228 
    229     //-------- 遥测配置 --------
    230 
    231     // 启用要发送给 Microsoft 的故障报表。
    232     // 此选项需重启才可生效。
    233     "telemetry.enableCrashReporter": true,
    234 
    235 
    236     //-------- CSS 配置 --------
    237 
    238     // 控制 CSS 验证和问题严重性。
    239 
    240     // 启用或禁用所有验证
    241     "css.validate": true,
    242 
    243     // 使用供应商特定前缀时,确保同时包括所有其他供应商特定属性
    244     "css.lint.compatibleVendorPrefixes": "ignore",
    245 
    246     // 使用供应商特定前缀时,还应包括标准属性
    247     "css.lint.vendorPrefix": "warning",
    248 
    249     // 不要使用重复的样式定义
    250     "css.lint.duplicateProperties": "ignore",
    251 
    252     // 不要使用空规则集
    253     "css.lint.emptyRules": "warning",
    254 
    255     // Import 语句不会并行加载
    256     "css.lint.importStatement": "ignore",
    257 
    258     // 使用边距或边框时,不要使用宽度或高度
    259     "css.lint.boxModel": "ignore",
    260 
    261     // 已知通配选择符 (*) 慢
    262     "css.lint.universalSelector": "ignore",
    263 
    264     // 零不需要单位
    265     "css.lint.zeroUnits": "ignore",
    266 
    267     // @font-face 规则必须定义 "src" 和 "font-family" 属性
    268     "css.lint.fontFaceProperties": "warning",
    269 
    270     // 十六进制颜色必须由三个或六个十六进制数字组成
    271     "css.lint.hexColorLength": "error",
    272 
    273     // 参数数量无效
    274     "css.lint.argumentsInColorFunction": "error",
    275 
    276     // 未知的属性。
    277     "css.lint.unknownProperties": "warning",
    278 
    279     // 仅当支持 IE7 及更低版本时,才需要 IE hack
    280     "css.lint.ieHack": "ignore",
    281 
    282     // 未知的供应商特定属性。
    283     "css.lint.unknownVendorSpecificProperties": "ignore",
    284 
    285     // 因显示而忽略属性。例如,使用 "display: inline"时,宽度、高度、上边距、下边距和 float 属性将不起作用
    286     "css.lint.propertyIgnoredDueToDisplay": "warning",
    287 
    288     // 避免使用 !important。它表明整个 CSS 的特异性已经失去控制且需要重构。
    289     "css.lint.important": "ignore",
    290 
    291     // 避免使用“float”。浮动会带来脆弱的 CSS,如果布局的某一方面更改,将很容易破坏 CSS。
    292     "css.lint.float": "ignore",
    293 
    294     // 选择器不应包含 ID,因为这些规则与 HTML 的耦合过于紧密。
    295     "css.lint.idSelector": "ignore",
    296 
    297 
    298     //-------- HTML 配置 --------
    299 
    300     // 每行最大字符数(0 = 禁用)。
    301     "html.format.wrapLineLength": 120,
    302 
    303     // 标记列表,以逗号分隔,不应重设格式。"null" 默认为所有内联标记。
    304     "html.format.unformatted": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, script, select, small, span, strong, sub, sup, textarea, tt, var",
    305 
    306     // 缩进 <head> 和 <body> 部分。
    307     "html.format.indentInnerHtml": false,
    308 
    309     // 是否要保留元素前面的现有换行符。仅适用于元素前,不适用于标记内或文本。
    310     "html.format.preserveNewLines": true,
    311 
    312     // 要保留在一个区块中的换行符的最大数量。对于无限制使用 "null"。
    313     "html.format.maxPreserveNewLines": null,
    314 
    315     // 格式和缩进 {{#foo}} 和 {{/foo}}。
    316     "html.format.indentHandlebars": false,
    317 
    318     // 以新行结束。
    319     "html.format.endWithNewline": false,
    320 
    321     // 标记列表,以逗号分隔,其前应有额外新行。"null" 默认为“标头、正文、/html”。
    322     "html.format.extraLiners": "head, body, /html",
    323 
    324 
    325     //-------- LESS 配置 --------
    326 
    327     // 控制 LESS 验证和问题严重性。
    328 
    329     // 启用或禁用所有验证
    330     "less.validate": true,
    331 
    332     // 使用供应商特定前缀时,确保同时包括所有其他供应商特定属性
    333     "less.lint.compatibleVendorPrefixes": "ignore",
    334 
    335     // 使用供应商特定前缀时,还应包括标准属性
    336     "less.lint.vendorPrefix": "warning",
    337 
    338     // 不要使用重复的样式定义
    339     "less.lint.duplicateProperties": "ignore",
    340 
    341     // 不要使用空规则集
    342     "less.lint.emptyRules": "warning",
    343 
    344     // Import 语句不会并行加载
    345     "less.lint.importStatement": "ignore",
    346 
    347     // 使用边距或边框时,不要使用宽度或高度
    348     "less.lint.boxModel": "ignore",
    349 
    350     // 已知通配选择符 (*) 慢
    351     "less.lint.universalSelector": "ignore",
    352 
    353     // 零不需要单位
    354     "less.lint.zeroUnits": "ignore",
    355 
    356     // @font-face 规则必须定义 "src" 和 "font-family" 属性
    357     "less.lint.fontFaceProperties": "warning",
    358 
    359     // 十六进制颜色必须由三个或六个十六进制数字组成
    360     "less.lint.hexColorLength": "error",
    361 
    362     // 参数数量无效
    363     "less.lint.argumentsInColorFunction": "error",
    364 
    365     // 未知的属性。
    366     "less.lint.unknownProperties": "warning",
    367 
    368     // 仅当支持 IE7 及更低版本时,才需要 IE hack
    369     "less.lint.ieHack": "ignore",
    370 
    371     // 未知的供应商特定属性。
    372     "less.lint.unknownVendorSpecificProperties": "ignore",
    373 
    374     // 因显示而忽略属性。例如,使用 "display: inline"时,宽度、高度、上边距、下边距和 float 属性将不起作用
    375     "less.lint.propertyIgnoredDueToDisplay": "warning",
    376 
    377     // 避免使用 !important。它表明整个 CSS 的特异性已经失去控制且需要重构。
    378     "less.lint.important": "ignore",
    379 
    380     // 避免使用“float”。浮动会带来脆弱的 CSS,如果布局的某一方面更改,将很容易破坏 CSS。
    381     "less.lint.float": "ignore",
    382 
    383     // 选择器不应包含 ID,因为这些规则与 HTML 的耦合过于紧密。
    384     "less.lint.idSelector": "ignore",
    385 
    386 
    387     //-------- Sass 配置 --------
    388 
    389     // 控制 Sass 验证和问题严重性。
    390 
    391     // 启用或禁用所有验证
    392     "sass.validate": true,
    393 
    394     // 使用供应商特定前缀时,确保同时包括所有其他供应商特定属性
    395     "sass.lint.compatibleVendorPrefixes": "ignore",
    396 
    397     // 使用供应商特定前缀时,还应包括标准属性
    398     "sass.lint.vendorPrefix": "warning",
    399 
    400     // 不要使用重复的样式定义
    401     "sass.lint.duplicateProperties": "ignore",
    402 
    403     // 不要使用空规则集
    404     "sass.lint.emptyRules": "warning",
    405 
    406     // Import 语句不会并行加载
    407     "sass.lint.importStatement": "ignore",
    408 
    409     // 使用边距或边框时,不要使用宽度或高度
    410     "sass.lint.boxModel": "ignore",
    411 
    412     // 已知通配选择符 (*) 慢
    413     "sass.lint.universalSelector": "ignore",
    414 
    415     // 零不需要单位
    416     "sass.lint.zeroUnits": "ignore",
    417 
    418     // @font-face 规则必须定义 "src" 和 "font-family" 属性
    419     "sass.lint.fontFaceProperties": "warning",
    420 
    421     // 十六进制颜色必须由三个或六个十六进制数字组成
    422     "sass.lint.hexColorLength": "error",
    423 
    424     // 参数数量无效
    425     "sass.lint.argumentsInColorFunction": "error",
    426 
    427     // 未知的属性。
    428     "sass.lint.unknownProperties": "warning",
    429 
    430     // 仅当支持 IE7 及更低版本时,才需要 IE hack
    431     "sass.lint.ieHack": "ignore",
    432 
    433     // 未知的供应商特定属性。
    434     "sass.lint.unknownVendorSpecificProperties": "ignore",
    435 
    436     // 因显示而忽略属性。例如,使用 "display: inline"时,宽度、高度、上边距、下边距和 float 属性将不起作用
    437     "sass.lint.propertyIgnoredDueToDisplay": "warning",
    438 
    439     // 避免使用 !important。它表明整个 CSS 的特异性已经失去控制且需要重构。
    440     "sass.lint.important": "ignore",
    441 
    442     // 避免使用“float”。浮动会带来脆弱的 CSS,如果布局的某一方面更改,将很容易破坏 CSS。
    443     "sass.lint.float": "ignore",
    444 
    445     // 选择器不应包含 ID,因为这些规则与 HTML 的耦合过于紧密。
    446     "sass.lint.idSelector": "ignore",
    447 
    448 
    449     //-------- Integrated terminal configuration --------
    450 
    451     // The path of the shell that the terminal uses on Linux.
    452     "terminal.integrated.shell.linux": "sh",
    453 
    454     // The path of the shell that the terminal uses on OS X.
    455     "terminal.integrated.shell.osx": "sh",
    456 
    457     // The path of the shell that the terminal uses on Windows.
    458     "terminal.integrated.shell.windows": "C:\Windows\system32\cmd.exe",
    459 
    460     // The font family used by the terminal (CSS font-family format).
    461     "terminal.integrated.fontFamily": "Menlo, Monaco, Consolas, "Droid Sans Mono", "Courier New", monospace, "Droid Sans Fallback"",
    462 
    463 
    464     //-------- 外部终端配置 --------
    465 
    466     // Customizes which terminal to run on Windows.
    467     "terminal.external.windowsExec": "cmd",
    468 
    469     // Customizes which terminal to run on Linux.
    470     "terminal.external.linuxExec": "xterm",
    471 
    472 
    473     //-------- TypeScript 配置 --------
    474 
    475     // 指定包含要使用的 tsserver 和 lib*.d.ts 文件的文件夹路径。
    476     "typescript.tsdk": null,
    477 
    478     // 完成函数的参数签名。
    479     "typescript.useCodeSnippetsOnMethodSuggest": false,
    480 
    481     // 启用/禁用 TypeScript 验证
    482     "typescript.validate.enable": true,
    483 
    484     // 启用对发送到 TS 服务器的消息进行跟踪
    485     "typescript.tsserver.trace": "off",
    486 
    487     // 定义逗号分隔符后面的空格处理
    488     "typescript.format.insertSpaceAfterCommaDelimiter": true,
    489 
    490     // 在 For 语句中,定义分号之后的空格处理
    491     "typescript.format.insertSpaceAfterSemicolonInForStatements": true,
    492 
    493     // 定义二进制运算符后面的空格处理
    494     "typescript.format.insertSpaceBeforeAndAfterBinaryOperators": true,
    495 
    496     // 定义控制流语句中的关键字之后的空格处理
    497     "typescript.format.insertSpaceAfterKeywordsInControlFlowStatements": true,
    498 
    499     // 定义匿名函数的函数关键字之后的空格处理
    500     "typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": true,
    501 
    502     // 定义非空圆括号的左括号之后和右括号之前的空格处理。
    503     "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
    504 
    505     // 定义非空方括号的左括号之后和右括号之前的空格处理。
    506     "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
    507 
    508     // 定义左大括号是否针对函数而放置在新的一行
    509     "typescript.format.placeOpenBraceOnNewLineForFunctions": false,
    510 
    511     // 定义左大括号是否针对控制块而放置在新的一行
    512     "typescript.format.placeOpenBraceOnNewLineForControlBlocks": false,
    513 
    514     // 启用/禁用 JavaScript 验证
    515     "javascript.validate.enable": true,
    516 
    517     // 定义逗号分隔符后面的空格处理
    518     "javascript.format.insertSpaceAfterCommaDelimiter": true,
    519 
    520     // 在 For 语句中,定义分号之后的空格处理
    521     "javascript.format.insertSpaceAfterSemicolonInForStatements": true,
    522 
    523     // 定义二进制运算符后面的空格处理
    524     "javascript.format.insertSpaceBeforeAndAfterBinaryOperators": true,
    525 
    526     // 定义控制流语句中的关键字之后的空格处理
    527     "javascript.format.insertSpaceAfterKeywordsInControlFlowStatements": true,
    528 
    529     // 定义匿名函数的函数关键字之后的空格处理
    530     "javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": true,
    531 
    532     // 定义非空圆括号的左括号之后和右括号之前的空格处理。
    533     "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
    534 
    535     // 定义非空方括号的左括号之后和右括号之前的空格处理。
    536     "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
    537 
    538     // 定义左大括号是否针对函数而放置在新的一行
    539     "javascript.format.placeOpenBraceOnNewLineForFunctions": false,
    540 
    541     // 定义左大括号是否针对控制块而放置在新的一行
    542     "javascript.format.placeOpenBraceOnNewLineForControlBlocks": false,
    543 
    544 
    545     //-------- PHP 配置选项 --------
    546 
    547     // 不管 php 验证是否已启用。
    548     "php.validate.enable": true,
    549 
    550     // 指向可执行的 php。
    551     "php.validate.executablePath": null,
    552 
    553     // 不管 linter 是在 save 还是在 type 上运行。
    554     "php.validate.run": "onSave",
    555 
    556     // 启用基于字的建议。
    557     "editor.wordBasedSuggestions": true
    558 
    559 }
  • 相关阅读:
    DigitalOcean上使用Tornado+MongoDB+Nginx+Supervisor+DnsPod快速搭建个人博客
    创业三年来的一些感想
    创业三年来的一些感想
    ViEmuVS2013-3.2.1 破解
    瘋子C语言笔记(指针篇)
    瘋子C语言笔记(结构体/共用体/枚举篇)
    瘋子C++笔记
    petalinux add pre-build application to rootfs compile faliure solution
    QA Issue: No GNU_HASH in the elf binary
    视觉SLAM——特征点法与直接法对比以及主流开源方案对比 ORB LSD SVO DSO
  • 原文地址:https://www.cnblogs.com/ytwanzi/p/13048468.html
Copyright © 2011-2022 走看看