EditorConfig
Sublime Text plugin for EditorConfig - Helps developers maintain consistent coding styles between different editors
Details
Installs
- Total 219K
- Win 84K
- Mac 91K
- Linux 45K
Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | Feb 12 | Feb 11 | Feb 10 | Feb 9 | Feb 8 | Feb 7 | Feb 6 | Feb 5 | Feb 4 | Feb 3 | Feb 2 | Feb 1 | Jan 31 | Jan 30 | Jan 29 | Jan 28 | Jan 27 | Jan 26 | Jan 25 | Jan 24 | Jan 23 | Jan 22 | Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | Jan 10 | Jan 9 | Jan 8 | Jan 7 | Jan 6 | Jan 5 | Jan 4 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 4 | 6 | 5 | 1 | 2 | 12 | 4 | 2 | 6 | 3 | 9 | 5 | 2 | 6 | 3 | 2 | 6 | 3 | 2 | 2 | 7 | 4 | 3 | 0 | 4 | 6 | 6 | 5 | 1 | 5 | 5 | 3 | 6 | 6 | 5 | 9 | 2 | 3 | 2 | 2 | 1 | 6 | 4 | 7 | 4 | 4 |
Mac | 6 | 5 | 3 | 2 | 3 | 4 | 1 | 4 | 0 | 4 | 6 | 12 | 7 | 2 | 5 | 4 | 3 | 4 | 4 | 6 | 8 | 6 | 2 | 5 | 1 | 2 | 4 | 5 | 4 | 5 | 4 | 1 | 2 | 2 | 4 | 4 | 3 | 1 | 3 | 2 | 3 | 7 | 3 | 3 | 2 | 2 |
Linux | 0 | 4 | 3 | 1 | 0 | 0 | 2 | 4 | 7 | 4 | 2 | 5 | 4 | 4 | 0 | 2 | 1 | 5 | 12 | 3 | 2 | 7 | 2 | 1 | 3 | 2 | 4 | 3 | 6 | 3 | 3 | 3 | 6 | 3 | 3 | 4 | 5 | 2 | 1 | 2 | 1 | 3 | 2 | 3 | 0 | 2 |
Readme
- Source
- raw.githubusercontent.com
EditorConfig
EditorConfig helps developers maintain consistent coding styles between different editors
Install
Install EditorConfig
with Package Control and restart Sublime.
Getting started
See the EditorConfig site for documentation.
Supported properties
- root
- indent_style
- indent_size
- end_of_line
- charset
- trim_trailing_whitespace
- insert_final_newline
Explanation of the properties can be found on the EditorConfig site.
The tab_width
property is intentionally not supported.
Example file
My recommended default settings
root = true
[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
Tips
EditorConfig snippet
If you can't remember all settings managed by the EditorConfig file, you'll love the editorconfig
snippet.
Just type editorconfig
+ tab, and your editor will focus on the first setting's value (indent_style = lf). You can change the value, if you want, and jump to the next setting's value by hitting tab and so on. Settings are somewhat autocompleted, and if you don't remember all possible values, simply remove the setting value to see them all as a comment.
You can be in a context where editorconfig
+ tab trigger another snippet. In that case, simply use Goto anywhere
(Ctrl + P on Linux/Windows or ⌘ + P on macOS), type editorconfig
, select Snippet: editorconfig
and hit Enter.
View active config
The active config is printed in the Sublime console.
Trailing whitespace
Even though there is a trim_trailing_whitespace
property. I would still recommend you set "draw_white_space": "all"
and/or "trim_trailing_white_space_on_save": true
in your Sublime settings to prevent you from accidentally committing whitespace garbage whenever a project is missing a .editorconfig file.