webstrom导入代码格式配置文件

tech2024-06-02  71

直接上配置文件

<code_scheme name="Project-Name"> <option name="HTML_DO_NOT_INDENT_CHILDREN_OF" value="html,body,thead,tbody,tfoot,script" /> <option name="FORMATTER_TAGS_ENABLED" value="true" /> <HTMLCodeStyleSettings> <option name="HTML_DO_NOT_INDENT_CHILDREN_OF" value="html,body,thead,tbody,tfoot,script" /> </HTMLCodeStyleSettings> <JSCodeStyleSettings> <option name="USE_SEMICOLON_AFTER_STATEMENT" value="false" /> <option name="FORCE_SEMICOLON_STYLE" value="true" /> <option name="SPACE_BEFORE_GENERATOR_MULT" value="true" /> <option name="USE_DOUBLE_QUOTES" value="false" /> <option name="FORCE_QUOTE_STYlE" value="true" /> <option name="SPACES_WITHIN_IMPORTS" value="true" /> </JSCodeStyleSettings> <TypeScriptCodeStyleSettings> <option name="USE_SEMICOLON_AFTER_STATEMENT" value="false" /> <option name="FORCE_SEMICOLON_STYLE" value="true" /> <option name="SPACE_BEFORE_GENERATOR_MULT" value="true" /> <option name="USE_DOUBLE_QUOTES" value="false" /> <option name="FORCE_QUOTE_STYlE" value="true" /> <option name="ENFORCE_TRAILING_COMMA" value="Remove" /> <option name="SPACES_WITHIN_IMPORTS" value="true" /> <option name="CHAINED_CALL_DOT_ON_NEW_LINE" value="false" /> </TypeScriptCodeStyleSettings> <codeStyleSettings language="HTML"> <indentOptions> <option name="CONTINUATION_INDENT_SIZE" value="4" /> </indentOptions> </codeStyleSettings> <codeStyleSettings language="JSON"> <option name="RIGHT_MARGIN" value="80" /> <option name="KEEP_BLANK_LINES_IN_CODE" value="1" /> <indentOptions> <option name="CONTINUATION_INDENT_SIZE" value="2" /> <option name="TAB_SIZE" value="2" /> </indentOptions> </codeStyleSettings> <codeStyleSettings language="JavaScript"> <option name="RIGHT_MARGIN" value="120" /> <option name="KEEP_BLANK_LINES_IN_CODE" value="1" /> <option name="SPACE_BEFORE_METHOD_PARENTHESES" value="true" /> <option name="CALL_PARAMETERS_WRAP" value="1" /> <option name="METHOD_PARAMETERS_WRAP" value="1" /> <option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" /> <option name="METHOD_CALL_CHAIN_WRAP" value="5" /> <option name="BINARY_OPERATION_WRAP" value="1" /> <option name="TERNARY_OPERATION_WRAP" value="5" /> <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" /> <option name="KEEP_SIMPLE_BLOCKS_IN_ONE_LINE" value="true" /> <option name="KEEP_SIMPLE_METHODS_IN_ONE_LINE" value="true" /> <option name="ARRAY_INITIALIZER_WRAP" value="5" /> <option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" /> <option name="IF_BRACE_FORCE" value="1" /> <option name="DOWHILE_BRACE_FORCE" value="1" /> <option name="WHILE_BRACE_FORCE" value="1" /> <option name="FOR_BRACE_FORCE" value="1" /> <indentOptions> <option name="INDENT_SIZE" value="2" /> <option name="CONTINUATION_INDENT_SIZE" value="2" /> <option name="TAB_SIZE" value="2" /> </indentOptions> </codeStyleSettings> <codeStyleSettings language="TypeScript"> <option name="RIGHT_MARGIN" value="80" /> <option name="KEEP_BLANK_LINES_IN_CODE" value="1" /> <option name="SPACE_BEFORE_METHOD_PARENTHESES" value="true" /> <option name="CALL_PARAMETERS_WRAP" value="1" /> <option name="METHOD_PARAMETERS_WRAP" value="1" /> <option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" /> <option name="METHOD_CALL_CHAIN_WRAP" value="5" /> <option name="BINARY_OPERATION_WRAP" value="1" /> <option name="TERNARY_OPERATION_WRAP" value="5" /> <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" /> <option name="KEEP_SIMPLE_BLOCKS_IN_ONE_LINE" value="true" /> <option name="KEEP_SIMPLE_METHODS_IN_ONE_LINE" value="true" /> <option name="ARRAY_INITIALIZER_WRAP" value="5" /> <option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" /> <option name="IF_BRACE_FORCE" value="1" /> <option name="DOWHILE_BRACE_FORCE" value="1" /> <option name="WHILE_BRACE_FORCE" value="1" /> <option name="FOR_BRACE_FORCE" value="1" /> <indentOptions> <option name="INDENT_SIZE" value="2" /> <option name="CONTINUATION_INDENT_SIZE" value="2" /> <option name="TAB_SIZE" value="2" /> </indentOptions> </codeStyleSettings> <codeStyleSettings language="XML"> <indentOptions> <option name="CONTINUATION_INDENT_SIZE" value="4" /> </indentOptions> </codeStyleSettings> </code_scheme>

在webstrom加入此文件,步骤如下:File–Setting–Editor–Code Style,选择导入的文件,保存

最新回复(0)