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 918
- Linux 1K
Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | Oct 7 | Oct 6 | Oct 5 | Oct 4 | Oct 3 | Oct 2 | Oct 1 | Sep 30 | Sep 29 | Sep 28 | 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 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 1 | 0 | 2 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
Linux | 0 | 1 | 0 | 0 | 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 | 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" },