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 907
- Linux 1K
Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | Feb 12 | Feb 11 | Feb 10 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 1 | 0 | 0 | 3 | 1 | 1 | 0 | 1 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 |
Linux | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 1 | 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" },