Reindent on save
Sublime Text - reindent on save
Details
Installs
- Total 25K
- Win 16K
- Mac 5K
- Linux 4K
Sep 27 | Sep 26 | Sep 25 | Sep 24 | Sep 23 | Sep 22 | Sep 21 | Sep 20 | Sep 19 | Sep 18 | Sep 17 | Sep 16 | Sep 15 | Sep 14 | Sep 13 | Sep 12 | Sep 11 | Sep 10 | Sep 9 | Sep 8 | Sep 7 | Sep 6 | Sep 5 | Sep 4 | Sep 3 | Sep 2 | Sep 1 | Aug 31 | Aug 30 | Aug 29 | Aug 28 | Aug 27 | Aug 26 | Aug 25 | Aug 24 | Aug 23 | Aug 22 | Aug 21 | Aug 20 | Aug 19 | Aug 18 | Aug 17 | Aug 16 | Aug 15 | Aug 14 | Aug 13 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 7 | 1 | 2 | 0 | 4 | 7 | 2 | 9 | 4 | 2 | 3 | 6 | 17 | 1 | 0 | 1 | 2 | 1 | 4 | 3 | 0 | 4 | 3 | 1 | 1 | 3 | 2 | 3 | 2 | 3 | 4 | 1 | 2 | 0 | 4 | 4 | 3 | 2 | 0 | 2 | 2 | 3 | 3 | 3 | 3 | 1 |
Mac | 0 | 0 | 0 | 0 | 1 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 |
Linux | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Sublime Text - reindent on save
This is simple plugin to call reindent each time you save your file.
What you should be aware is that sublime's reindent is not perfect.
You can specify file types which you want to be reindented on save:
"reindent_on_save": ["css", "SCSS", "html", "Js"]
Installation
The recommended installation method is via Package Control. Learn more here: https://sublime.wbond.net/.
How to add configuration option
In your Sublime navigate to Preferences \ Settings - User
Your settings file will be opened.
In fresh installation of Sublime it probably will be something like this:
{
"ignored_packages": ["Vintage"]
}
Or if you have made some changes, they will be saved here, in my case I had something like this:
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"convert_tabspaces_on_save": true,
"default_line_ending": "unix",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"font_size": 14,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages": ["Vintage"],
"rulers": [80, 120],
"show_encoding": true,
"show_line_endings": true,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"word_wrap": false
}
To add new options, just place comma after last option and add new one, here is what it will look like in fresh installation:
{
"ignored_packages": ["Vintage"],
"reindent_on_save": ["php", "sublime-settings", "json", "html", "css"]
}
That is important to not forget add comma, or sublime will fail saving changes, and show you error message “Error trying to parse settings: Unexpected character, expected a comma”