Sublime Forum

Tab to spaces doesn't work

#1

I have
“translate_tabs_to_spaces”: true
“use_tab_stops”: true
“detect_indentation”: true
“draw_indent_guides”: true
“tab_size”: 4
in my user preferences

normally, when I hit tab, it should insert four spaces (or whatever Sublime has detected as the indentation for that file) and when I hit delete it should delete two spaces to get me back where I was.
But the problem is, no matter what I have set for tab_size it only inserts and deletes one space, and the indentation guides are all screwed up (they auto correct if I revert to using tabs instead of spaces btw)
Its driving me crazy.

I’m on Version 2.0.1, Build 2217
This seemed to work fine in beta but since going to the stable builds I’ve been having this problem.

0 Likes

#2

I figured out what the problem was and hopefully this helps someone else.
So in updating my preferences, my fonts went from a monospace font to another font that wasn’t monospace (Monokai).
Well, because the characters in Monokai (and any other monospace font) don’t have equal widths, it throws the indentation guides off, and makes it look like its only inserting one space when its actually inserting two.

Took a while to figure out, and yes I do feel pretty sheepish right now

0 Likes