EditorConfig
Sublime Text plugin for EditorConfig - Helps developers maintain consistent coding styles between different editors
Details
Installs
- Total 221K
- Win 84K
- Mac 92K
- Linux 45K
Aug 16 | Aug 15 | Aug 14 | Aug 13 | Aug 12 | Aug 11 | Aug 10 | Aug 9 | Aug 8 | Aug 7 | Aug 6 | Aug 5 | Aug 4 | Aug 3 | Aug 2 | Aug 1 | Jul 31 | Jul 30 | Jul 29 | Jul 28 | Jul 27 | Jul 26 | Jul 25 | Jul 24 | Jul 23 | Jul 22 | Jul 21 | Jul 20 | Jul 19 | Jul 18 | Jul 17 | Jul 16 | Jul 15 | Jul 14 | Jul 13 | Jul 12 | Jul 11 | Jul 10 | Jul 9 | Jul 8 | Jul 7 | Jul 6 | Jul 5 | Jul 4 | Jul 3 | Jul 2 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 3 | 3 | 3 | 6 | 4 | 14 | 4 | 2 | 7 | 5 | 5 | 2 | 3 | 2 | 3 | 3 | 3 | 2 | 5 | 1 | 2 | 1 | 1 | 6 | 3 | 3 | 4 | 6 | 2 | 4 | 2 | 0 | 4 | 6 | 4 | 5 | 2 | 0 | 7 | 6 | 5 | 2 | 0 | 4 | 2 | 5 |
Mac | 2 | 3 | 2 | 3 | 7 | 1 | 6 | 3 | 1 | 4 | 6 | 3 | 2 | 3 | 1 | 0 | 4 | 5 | 6 | 4 | 4 | 4 | 4 | 3 | 0 | 5 | 1 | 1 | 0 | 3 | 1 | 2 | 3 | 2 | 2 | 3 | 2 | 7 | 2 | 4 | 4 | 2 | 3 | 2 | 2 | 1 |
Linux | 1 | 2 | 2 | 4 | 1 | 5 | 8 | 4 | 4 | 1 | 4 | 4 | 5 | 0 | 5 | 5 | 1 | 0 | 0 | 1 | 2 | 4 | 3 | 2 | 2 | 11 | 2 | 2 | 1 | 0 | 1 | 1 | 2 | 3 | 7 | 1 | 1 | 2 | 1 | 2 | 1 | 0 | 1 | 2 | 4 | 1 |
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.