Reputation: 2157
how to set the same tabsize width with 4 space in sublime text?
I like verdana font ,then I set font to it in sublime text, but it appears that the 1 tab is much wider then 4 space. why? how to fix?
Upvotes: 2
Views: 1276
Reputation: 20348
Probably, this is a problem related to how Sublime handles tabsize.
It seems to use the size of an em-dash (—), instead of the size of a space. In monospaced fonts, of course, those sizes are the same, but in proportional fonts, such as Verdana, they are quite different:
" " (4 spaces)
"————" (4 em-dashes)
So, I think that the only way to solve your problem is to convert tabs to spaces with View/Indentation/Convert Indentation to Spaces
. And be sure to have "translate_tabs_to_spaces": true
in your preferences and Indent Using Spaces
set in Indentation
menu:
Upvotes: 6
Reputation: 10874
The particular file you've included as a screenshot forces itself to use tabs instead of spaces, so that could be why it seems much too large of a space. Even if you set "translate_tabs_to_spaces": true,
in your User Settings, this isn't applied to the Settings files themselves.
You can make sure what you're seeing is actually spaces/tabs by turning on draw_white_space
in the preferences. You can do this by editing your User Settings (Preferences -> Settings -> User) and adding the line "draw_white_space": "selection",
(remember not to include the comma if this is the last line of your settings).
This value can be set to "none" to turn off drawing white space, "selection" to draw only the white space within the selection, and "all" to draw all white space.
If you do that, then restart Sublime Text 2, it might give you a good idea of what's going on.
Upvotes: 2