Sublime Forum

Tab is too short!

#1

my sublime tab is too short ,don’t like it,I wish can set it more widther…

0 Likes

#2

You can set the tab size in settings
https://www.sublimetext.com/docs/3/indentation.html

0 Likes

#3

my means is tab width ,not tab size
and python need tab_size=4
so…
I want to set tab width,

0 Likes

#4

I might be wrong, but I believe it depends on the font width. Maybe try different fonts.

0 Likes

#5

It’s because you have a font with variable width. Use a fixed-size font instead.

4 Likes

#6

It’s my sublime version , 1 tab width > 4 space width ,I need 1 tab width equal 4 space width
version 3.0 build 3143

thank you!

0 Likes

#7

You have “translate_tabs_to_spaces” set to true, so tabs get converted to spaces. That’s why you have 4 spaces.

0 Likes

#8

python require 1 tab width equal 4 space width,I find It’s my font-face not suitable ,when I set my sublime default font-face ,it’s very good. thank you!

0 Likes

#9

I might be misunderstanding you, but python (pep8) prefers spaces for indentation.
(https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces)

A strong preference seems to be for 4 spaces.
(http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html#whitespace-1)

From this we can conclude that you need translate_tabs_to_spaces = true and tab_size = 4.
There is no requirement for one tab to be as wide as 4 spaces, what gave you that idea?
The font-face is only an aesthetic choice, so the code looks nicer and more organized visually.

0 Likes