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 914
- Linux 1K
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 | Aug 12 | Aug 11 | Aug 10 | Aug 9 | Aug 8 | Aug 7 | Aug 6 | Aug 5 | Aug 4 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 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 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 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" },