Sublime Forum

Ruler not working right

#1

Iā€™m trying to place a ruler at column 80, however this setting:

ā€œrulersā€:[80],

is putting it at 196. Am I doing something wrong? Others Iā€™ve shown this to think my setting is correct.

Thanks!

0 Likes

#2

I have the same problem.
ruller to 80 puts the ruller at column 167.

0 Likes

#3

Solved by reinitializing the settings.
Than write again in the userā€™s config file ā€œruler[70]ā€ and should work

0 Likes

#4

I have same problem with sublime text 3 build 3114 on ubuntu 16.04, how can I fix(initializing the settings. what this mean step by step) this ?

0 Likes

#5

Post steps and all contextual information to reproduce the problem please.

Have you tried with a clean install?

0 Likes

#6

when you set wrong the config param for font_face, for example wrong font name or misspelled name you will get wrong rulers. It is clean install.

0 Likes

#7

I see. Looks like an unknown font face messes up more than just the rulers; faceless recently had a problem with font size as well.

I guess Sublime could warn users that it canā€™t find the specified font face in that case.

Note: on my machine though the fallback font is ugly enough that I wouldnt mistake a fontface problem with something else.

0 Likes

#8

Sublime should probably fall back to a known good font on the system and handle it like every other font. For some reason, whatever it falls back to just doesnā€™t get handled in a normal fashion breaking things.

1 Like

#9

:+1:
I guess because the default font_face is defined in the platform specific Default preferences files, and the way the settings/resources API works, it can no longer retrieve the value from there once it has been overridden in a User file.

0 Likes

#10

Maybe, but internally, it should always have a sound default. It shouldnā€™t care that the default setting gets wiped out as internally it should be prepared and have something that works.

0 Likes

#11

I donā€™t know about Sublime Textā€™s internals, but having dealt with font problems in other apps I will point out that often when a particular requested font is not found, the OS silently substitutes its best guess at an alternative font and the application doesnā€™t necessarily know about it. So ST mightnā€™t be able to substitute a known good font in this case.

3 Likes

#12

These latest replies donā€™t seem related to the original post, but they appear related to what Iā€™m experiencing so I suspect I should stick with it.

If I set "rulers": [32] (convenient for PICO-8 work) in Settings - User or some other user settings file, it works. If I then set View > Ruler to anything, including None, the ā€œrulersā€ setting stops working but only for the file type (or syntax type) that was active when I made the menu selection. I have tried all sorts of things to get it back such as setting the menu to None or changing the ā€œrulersā€ setting to other columns, empty values, and the same value as the menu, but nothing works. I even tried changing the file type to another syntax type and back. I expect reinstalling Sublime would work but that is such a harsh move for such a small annoyance.

If this canā€™t be made to work as intended then consider a setting for adding to or overriding the options in the menu. That might be more useful anyhow.

0 Likes

#13

Using the menu to set a ruler sets a view-specific setting that will persist only for that view. The only ways to remove this is to close and reopen the view or to manually erase the override via view.settings().erase("rulers").

2 Likes

#14

Thanks, I just realized I must have missed the obvious testing of closing the file and/or Sublime and reopening. I thought I had done that but it does indeed work to close the file and reopen to get the correct ruler back. Not sure how I got to thinking otherwise. Sorry.

0 Likes

#15

I have this problem on sublimetext 3 build 3126. Ruler does not appear on all files after defined it on Users Preferences. I just bought this after years of use and now headache of missing functionality :frowning: so sad.

I have tried change fonts, sizes, restarting etc. nothingā€¦
my config file:
{ "bootstrapped": true, "ensure_newline_at_eof_on_save": true, "font_size": 11, "ignored_packages": [ "Vintage" ], "in_process_packages": [ ], "installed_packages": [ "Laravel Blade Highlighter", "Package Control" ], "rulers": [ 80 ], "translate_tabs_to_spaces": true, "font_face": "Monospace" }

0 Likes

#16

What does that mean exactly? In which files do you see it and in which do you not?

0 Likes

#17

actually it does not appear in any. only in the ones I set manually through the menu option.

0 Likes

#18

You might have rulers specified in a different place that can override user settings then. Examples for this are project-specific and syntax-specific settings.

Project settings are configured in the project file (Project ā†’ Edit Projectā€¦) and syntax-specific in special user settings files (Preferences ā†’ Settings - Syntax Specific).

0 Likes

#19

yeah, perfect. that works! thanks :slightly_smiling:

0 Likes