无法更改Beautify缩进尺寸

时间:2016-12-11 19:04:51

标签: atom-editor

我试图在Atom Beautify中将CSS / SCSS的缩进大小更改为两个空格,但它没有效果,并且缩进保持在四个空格。即使我在.jsbeautifyrc文件中将其设置为两个空格,它也没有效果。我错过了什么吗?

{
    "indent_size": 2,
    "indent_char": " ",
    "indent_level": 0,
    "indent_with_tabs": false,
    "preserve_newlines": true,
    "max_preserve_newlines": 10,
    "jslint_happy": false,
    "space_after_anon_function": false,
    "brace_style": "collapse-preserve-inline",
    "keep_array_indentation": false,
    "keep_function_indentation": false,
    "space_before_conditional": true,
    "break_chained_methods": false,
    "eval_code": false,
    "unescape_strings": false,
    "wrap_line_length": 0
}

1 个答案:

答案 0 :(得分:1)

atom-beautify使用自己的配置,可以在Atom中通过以下两种方式进行更改:

  1. 在“设置”GUI中
    • Ctrl + ,打开设置(或文件>设置)
    • 选择
    • 查找atom-beautify,然后点击设置
    • 找到 CSS ,然后点击展开CSS设置
    • 缩进尺寸
    • 中输入所需的缩进尺寸
    • 重复 SCSS
    • 的前两个步骤
  2. config.cson
    • 文件>配置...打开config.cson
    • 添加以下内容
  3. "atom-beautify":
      css:
        indent_size: 2
      scss:
        indent_size: 2
    
相关问题