Sublime Forum

Disable tab stop sublime

#1

Hello

I want to disable this HORRIBLE behavior of the editor. It’s called tab stop and I hate it, it sucks, and it brings me headache.

I have my tabs set at 3, sometimes when I press tab, a tab is inserted but it looks smaller in width than the others. I wanna get past this behavior, when I press tab, I want to see a length of 3, period.

A little example of this madness :

Don’t tell me to use spaces, I hate them.

0 Likes

#2

but you are using spaces…

depending on your settings, ST will convert tabs to spaces - make sure you have set "translate_tabs_to_spaces": false, and "detect_indentation": false, in your user preferences to prevent it.

0 Likes

#3

Yes, but if I use tabs, it effectively mess up my indentation…

look the above example, I needs to tabs to align the 3rd function with the 1st one

0 Likes

#4

so change your keybinding to always insert 3 spaces when you press Tab with no selection then… maybe something like:

{ "keys": ["tab"], "command": "insert_snippet", "args": { "contents": "   " },
    "context":
    [
        { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
    ]
},

but if you want it to insert the number of spaces based on your tab_size preference, you will have to write a tiny plugin to do it I think.

0 Likes