原子美化:使用制表符缩进 html

atom-beautify: indent html with tabs

如何在 atom-beautifier 中设置 html to tab 的缩进大小? 我在 .jscsrc 中尝试了以下但它没有任何效果。

{
  "html": {
    "indent_char": "    ",
    "indent_size": 1,
    "indent_with_tabs": true
  }
}

atom-beautifier 包已弃用,作者建议用户迁移到 atom-beautify package:

Please use: https://atom.io/packages/atom-beautify It's much better :)

atom-beautify包支持.jsbeautifyrc配置缩进大小:

{
  "indent_size": 2,
  "indent_char": " ",
  "other": " ",
  "indent_level": 0,
  "indent_with_tabs": false,
  "preserve_newlines": true,
  "max_preserve_newlines": 2,
  "jslint_happy": true,
  "indent_handlebars": true
}

{ "indent_char": " ", //Tab here. Make sure editor doesn't change it. "indent_size": 1, "indent_with_tabs": true }

我把它放在 $ATOMPATH/packages/atom-beautify/.jsbeautifyrc$ATOMPATH/packages/atom-beautify/src/.jsbeautifyrc

atom-beautify 仍然是有问题的标签。还要确保在 Atom 中关闭 "soft tabs"。

以下是消除空格的一些要点:

https://gist.github.com/zamicol/c5c926500ddde49006122f9e4e52e48f