在之前格式配置的编辑器中,设置通用的代码格式。
sublime text支持 editorconfig。
设置,保存为.editroconfig。
# editorconfig the root for search edit cofig file ## http://editorconfig.org/ ## you can use # or ; to say this line is a comment. root = true ; top-most editorconfig file # unix-style newlines with a newline ending every file [*] # set to lf, cr, or crlf to control how line breaks are represented end_of_line = lf insert_final_newline = true # set to tab or space to use hard tabs or soft tabs respectively indent_style = space # set to latin1, utf-8, utf-8-bom, utf-16be or utf-16le # to control the character set. Use of utf-8-bom is discouraged. charset = utf-8 # set to true to remove any whitespace characters preceeding newline characters trim_trailing_whitespace = true # default indent is 4 # a whole number defining the number of columns used for each indentation level # and the width of soft tabs (when supported). # When set to tab, the value of tab_width (if specified) will be used indent_size = 4 # space indentent [*.js] indent_size = 2