Why is tab spacing different between languages!


When editing in different language formats the tab spacing is different. In settings it’s set to represent tabs as 2 spaces, and tabs set to hard. The gif below shows a javascript file and a python file with the same text but you can see the python file looks like it has double (4 spaces) what the javascript file has.


Because the language packages have different settings. language-python has a tabLength setting and language-javascript does not. You can override each of these settings locally, either globally or per language.


Hmm, this should have worked but check this…


It looks like it’s working. With no setting, the language-python setting is used. But when you set it to 1 or 2, that overrides the language.


Well, the length I like is what is shown when I type 2 (before the plugin automatically changes it)… Must be a bug, should I submit an issue?


You can just override the Python tab length. Each package has its own settings page (accessible via Settings -> Packages), and you can just add the following to the top level (unindented) of your config.cson:

    tabLength: 4


Cheers, below worked a charm.

    tabLength: 2