lite-plugins
lite-plugins copied to clipboard
More robust indentation detect algorithm
I propose a new more robust algorithm to detect the indentation size. It reads the whole file and is not fooled if a few lines use a wrong indentation. It works by looking the distribution of indentation size and use a simple heuristics to determine the best guess.
I found it useful for files where the indentation size is not strictly respected.
Just a comment, kinda intrusive how it overrides my initially set tab width, but nevertheless, cool upgrade
I am open to amend its behavior if you have a suggestion.
nah, not really, just wanted to point that out, some people are really religious over their tab lengths