AutoSetIndentation
❌ [Deprecated] This plugin automatically detects and sets the indentation for you, by default, when a file is loaded.
Details
Installs
- Total 8K
- Win 6K
- Mac 900
- Linux 1K
Jan 11 | Jan 10 | Jan 9 | Jan 8 | Jan 7 | Jan 6 | Jan 5 | Jan 4 | Jan 3 | Jan 2 | Jan 1 | Dec 31 | Dec 30 | Dec 29 | Dec 28 | Dec 27 | Dec 26 | Dec 25 | Dec 24 | Dec 23 | Dec 22 | Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | Dec 6 | Dec 5 | Dec 4 | Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 3 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 2 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
❌ [Deprecated] ST-AutoSetIndentation
This Sublime Text 3 plugin automatically detects and sets the indentation for you, by default, when a file is loaded.
Important Notice
As of Sublime Text 4, the dev team has been use test cases from this plugin to improve the built-in indentation detection and it works quite well. So, you probably no longer needs this plugin in Sublime Text 4.
Why Do I Make This
Sublime Text detects the indentation when a file is loaded
if detect_indentation
is set to true
, which is the default settings.
However, its detection is wrong sometimes. You could give following cases a try!
- Files under the problem_files/
- https://forum.sublimetext.com/t/detect-indentation-with-3-spaces-is-broken/45143
- https://github.com/SublimeTextIssues/Core/issues/1459
- https://github.com/SublimeTextIssues/Core/issues/1640
I find that Indent Finder detects above files correctly so I make it into this plugin.
Notes
Abbreviations
- ST = Sublime Text
- ASI = AutoSetIndentation (this plugin)
ASI respects indentation settings from
.editorconfig
files.If you don't want to replace ST's
detect_indentation
command with ASI's, set the plugin settinghijack_st_detect_indentation
tofalse
.Even if
hijack_st_detect_indentation
is set totrue
by default, ST will still detects the indentation internally before ASI is ready to work. After that, ASI will detects the indentation again hence ST's result will be overridden but the detection is done twice. Therefore, you may want to setdetect_indentation
tofalse
to skip ST's.
Installation
This package is available on Package Control by the name of AutoSetIndentation.
Settings
To edit settings, go to Preferences
» Package Settings
» AutoSetIndentation
» Settings
.
I think the settings file is self-explanatory. But if you still have questions, feel free to open an issue.
Commands
You may disable all event_listeners
in your user settings
and add a key binding to auto set the indentation whenever you want.
{ "keys": ["ctrl+alt+s", "ctrl+alt+i"], "command": "auto_set_indentation" },