如何设置VSCode设置,以便不同文件类型的规则不同?

时间:2018-11-01 18:24:53

标签: visual-studio-code vscode-settings

在我的VSCode用户设置中,我使用80个字符的默认标尺,使用:

"editor.rulers": [80],

在编辑git commits时-为了帮助遵守50/72规则(12)-我想使用以下标尺覆盖默认值:

"editor.rulers": [50, 72],

1 个答案:

答案 0 :(得分:2)

鉴于以上问题的评论,我有一个可行的解决方案:

{
  "editor.rulers": [80],
  "[git-commit]": {
    "editor.rulers": [50, 72]
  },
}

有关VSCode Language specific editor settings的更多信息