Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jfcherng-sublime/ST-AutoSetIndentation
❌ [Deprecated] This plugin automatically detects and sets the indentation for you, by default, when a file is loaded.
https://github.com/jfcherng-sublime/ST-AutoSetIndentation
indent indentation sublime-text
Last synced: 4 months ago
JSON representation
❌ [Deprecated] This plugin automatically detects and sets the indentation for you, by default, when a file is loaded.
- Host: GitHub
- URL: https://github.com/jfcherng-sublime/ST-AutoSetIndentation
- Owner: jfcherng-sublime
- License: mit
- Archived: true
- Created: 2019-02-23T08:44:47.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-07-24T07:27:38.000Z (over 3 years ago)
- Last Synced: 2024-08-05T08:07:08.110Z (7 months ago)
- Topics: indent, indentation, sublime-text
- Language: Python
- Homepage: https://packagecontrol.io/packages/AutoSetIndentation
- Size: 169 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# ❌ [Deprecated] ST-AutoSetIndentation
[](https://travis-ci.org/jfcherng-sublime/ST-AutoSetIndentation)
[](https://packagecontrol.io/packages/AutoSetIndentation)
[](https://github.com/jfcherng-sublime/ST-AutoSetIndentation/tags)
[](https://github.com/jfcherng-sublime/ST-AutoSetIndentation/blob/master/LICENSE)
[](https://github.com/jfcherng-sublime/ST-AutoSetIndentation/stargazers)
[](https://www.paypal.me/jfcherng/5usd)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://github.com/jfcherng-sublime/ST-AutoSetIndentation/tree/master/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/1640I find that [Indent Finder](http://www.freehackers.org/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 setting `hijack_st_detect_indentation` to `false`.- Even if `hijack_st_detect_indentation` is set to `true` 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 set `detect_indentation` to `false` to skip ST's.## Installation
This package is available on Package Control by the name of
[AutoSetIndentation](https://packagecontrol.io/packages/AutoSetIndentation).## Settings
To edit settings, go to `Preferences` » `Package Settings` » `AutoSetIndentation` » `Settings`.
I think the [settings file](https://github.com/jfcherng-sublime/ST-AutoSetIndentation/blob/master/AutoSetIndentation.sublime-settings)
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.```javascript
{ "keys": ["ctrl+alt+s", "ctrl+alt+i"], "command": "auto_set_indentation" },
```## Acknowledgment
- [editorconfig](https://github.com/editorconfig/editorconfig-core-py)
- [Indent Finder](http://www.freehackers.org/Indent_Finder)