Sublime Forum

Ruler position, doesn't seem to be equivelent to anything

#1

Hello,
I’m trying to find a correlation between the ‘Ruler’ setting and, well anything.
as it’s Not:

a setting of 54 seems to be around 80 characters, so not columns or characters
a setting of 80 is around 200 characters
40 is in the middle of the 80 character page
tabs set to 2 ‘spaces’ x anything doesn’t come out to 54…
pixels are the closest thing to ‘80’ (800 / 96dpi), but still not 54.
no multiple of em, point, pica, nothing.

So what are you, what should I be using to figure out:
tab
ruler
columns
warp etc… ?

Thanks.
Landis.
ps,
I’m sorry for the tone, but it’s very late and I’m tired of trying to acquire information on a number of topics tonight that due to the carp that is our available ‘search engines’ ie bing and google, seems next to impossible to find.

0 Likes

#2

are you using a proportional font? ruler sizes and word wrap sizes only really apply to monospace fonts

1 Like

#3

The width should be measured by the width of the character m

0 Likes

#4

YES… : )

Ah… Fix Width…
It just dawned on me 30 mins ago, the space being taken up by 1 was not the same as 0. so I was going to make a string of 80 ‘W’'s (@r-stein says ‘m’) to test the theory.

anyways,
so I changed my font from DejaVu Sans to DejaVu Sans Mono and the ruler set to ‘54’ is now at, wait for it… 54 and not the 80th characters / ‘column’.
Changed ruler to 80, and it’s in-fact at the 80th character in a string of 1 thru 0, repeated 8x.
Thanks for taking the time to inquire, as in-fact, I was.

This all came to light, when I was debating converting all my tabs to spaces, as the formatting seemed to change… depending on the editor, system etc.
I spent a day chasing that down and found via format standards published by PHP, Python, HTML5 (w3c) and yes, even Google Style Guide say spaces, not tabs for this very reason. Yet, almost every ‘expert’ who’s blog I read said ‘tabs’ some go as far as to insult ‘space’ users. Hmm…
I’m setting mine to 4 spaces = 1 tab (2 is not enough for my eyes).
Now, going back and doing a regex/find/replace [something like ^\t{1,2}\n{0}\s{4}] on past docs, I think about as and if I open them.
*hmm, maybe and option is SublimeText, or a Package for this exact thing.

Again, thanks. I was really frustrated last night over this tabs/spaces thing.
Landis.

0 Likes

#5

Nope… with the fix width font, 2 space = 1 tab is aesthetically good for documenting and for code I’ll just double tab to get php, html5, pythons ‘4 spaces indent’. not a problem. - Thanks.

life is good again.
Landis.
ps, oh, there’s the oxygen-engine issue with opensuse and kde, but that’s another thing entirely. : )

0 Likes

#6

You can convert tabs to spaces or spaces to tabs (or spaces to tabs to space) in the bottom right. Just click on the tabwidth and then “convert tabs to spaces”/“spaces to tabs”.

0 Likes