5

I understand that the Brackets Beautify extension is based on JS Beautify, and that I have a suite of preference settings available because of that, but I have no idea of how to alter them through the Brackets settings.json file. Does anyone have any idea?

Here are my current settings:

   {
        "debug.showErrorsInStatusBar": false,
        "linting.collapsed": true,
        "wordWrap": false,
        "me.drewh.jsbeautify.on_save": false,
        "styleActiveLine": true,
        "themes.theme": "explicit-brackets-style",
        "fonts.fontSize": "12px"
    }

I'm assuming I just need to add new "me.drewh.jsbeautify" lines, but that doesn't seem to work...

I'm specifically looking at HTML settings, BTW.

4

1 回答 1

3

与原始一样,扩展使用.jsbeautifyrc文件进行设置。

如果您在项目根目录中创建这样一个文件,其内容如下:

{
    "eol": "\n",
    "end_with_newline": true,
    "preserve_newlines": true,
    "max_preserve_newlines": 10,
    "indent_inner_html": false,
    "brace_style": "collapse",
    "indent_scripts": "normal",
    "wrap_line_length": 0,
    "wrap_attributes": "auto"
}

此外,我只能建议您查看我的该扩展的分支,因为它允许更详细的设置

于 2015-07-25T09:27:40.297 回答