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

问题描述 投票:0回答:1

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

"editor.rulers": [80],

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

"editor.rulers": [50, 72],
visual-studio-code vscode-settings
1个回答
2
投票

鉴于我对上述问题的评论,我有一个有效的解决方案:

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

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

© www.soinside.com 2019 - 2024. All rights reserved.