Remillard / VHDL-Mode

A package for Sublime Text that aids coding in the VHDL language.
MIT License
40 stars 10 forks source link

Auto-detect indentation preference #107

Closed stefanlippuner closed 5 years ago

stefanlippuner commented 5 years ago

Indent using tabs instead of spaces, this allows ST to automatically convert them to the users preference

Remillard commented 5 years ago

Okay I've browsed through my older code and your alteration which is pretty simple. This just sets the default to using tabs.

It's probably not really useful to go through the whole settings detection in the entity pasting command simply because I was trying to keep a certain amount of API separation there. The classes in methods of vhdl_lang.py are by and large ignorant of Sublime Text 3 calls. That's why I do the check in the beautify method before it calls all those methods. However in the case of the entity, we're already down in the Interface class so calling it there would break my agnosticism. Changing the default to use Tabs will do what you say, put in tabs and then Sublime ought to alter that per user settings automatically and produce a good result.

Accepting the merge as-is and I'll write up the approrpriate documentation to accompany it.