编辑器就是生产力,符合我的编程习惯和风格的编辑器能给开发带来轻松愉快的心情和生产力。前端开发中愈来愈多东西须要经过配置文件来进行配置,如今编辑器也使用了这一方法。前端
存在的目的是项目代码在不一样的编辑器中可以有相同的视觉呈现,使用不一样的编辑器开发也可以保持一向的代码风格和编程习惯。编程
注释符号"#",使用注释符号能够将一行注释json
配置文件的优先级高于编辑器的设置编辑器
可选项tab和space,缩进样式ide
当indent_style为space时,缩进对应的空格数量。值为整数spa
当indent_style为tab时,缩进的宽度值code
设置换行符号,可选值 'lf' 'cr' 'crlf'ip
每一个文件结尾是否包含一个空行,jslint的规范在代码结尾须要有一个空行用来代表代码的结束。可选值 'true'或者 'false'utf-8
删除每一行结尾的空白字符,可选值 'true' 或者 'false'ci
# EditorConfig is awesome: https://EditorConfig.org # top-most EditorConfig file root = true # Unix-style newlines with a newline ending every file [*] end_of_line = lf insert_final_newline = true # Matches multiple files with brace expansion notation # Set default charset [*.{js,py}] charset = utf-8 # 4 space indentation [*.py] indent_style = space indent_size = 4 # Tab indentation (no size specified) [Makefile] indent_style = tab # Indentation override for all JS under lib directory [lib/**.js] indent_style = space indent_size = 2 # Matches the exact files either package.json or .travis.yml [{package.json,.travis.yml}] indent_style = space indent_size = 2