Home Download Buy Blog Forum Support

Tab size with proportional fonts

Tab size with proportional fonts

Postby tobia on Fri Dec 21, 2012 4:16 pm


There's a minor bug that's bugging me :P related to proportional fonts.

Since I switched to SublimeText I've been able to use proportional fonts for coding, something I've been wanting to do for a while, but could not do on my previous editor (Vim.) It all works very well. I've tried a number of different fonts and have settled on Verdana 13. It's a definite improvement over monospaced fonts.

The only thing that's somewhat off is the tab size. To get a tab size of approximately 4 spaces I have to set tab_size to 2. It would seem that SublimeText is reading the tab_size setting in em units. In fact, with my tab_size setting of 2 I get tabs just as wide as 2 em-dashes "—"

This does not pose a problem when I'm editing my own files, where I use tab characters for indentation, but it causes a graphical glitch when editing files that use spaces for indentation.

With the awesome detect_indentation feature I can open any kind of file and ST will automatically detect the correct tab_size for each file. But when it detects eg. 4 spaces and sets tab_size to 4, then it draws the dotted lines at 4em intervals… which is completely off from the actual indentation of 4 space characters.

I believe the correct behaviour would be to interpret tab_size as a multiple of the current font's space character width, instead of em units.
Posts: 9
Joined: Tue Oct 16, 2012 2:55 pm

Re: Tab size with proportional fonts

Postby mikecline on Thu Apr 25, 2013 6:55 am

I hope this gets fixed! This is so messed up. Please see screen shot.

Looks really bad in files which have mixed tabs and spaces for indentation!
badTabIndentation.jpg (31.65 KiB) Viewed 487 times
Posts: 6
Joined: Sat Mar 24, 2012 5:07 am

Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 22 guests