Sublime Forum

`rulers` are acting strange

#1

In my python (syntax) specific settings, I have "rulers": [72, 79], and this has worked for me for as long as I can remember. But recently I only see the 79 ruler and not the 72 one.

If I specify multiple rulers in User/Preferences.sublime-settings, then I see all the specified rulers in any file other than .py.

When I switch between .py files from the sidebar the rulers briefly show but immediately disappear.

view.settings().get('rulers') outputs [79] and I can get the rulers to show again by typing view.settings().set('rulers', [72, 79]) in the console.

I am on macOS 12.1 on an Apple silicone machine with ST Build 4126.

0 Likes

#2

As a first test, I would verify if that is still the case in Safe Mode; start Sublime that way, set up a new syntax specific setting for Python, and see if it behaves as you expect or not.

The rulers briefly show but immediately disappear smells like a plugin forcing a different setting on load.

If that was the case, as an extra verification using view.settings().erase('rulers') would remove any buffer specific setting and return back to the settings as applied by the syntax specific settings.

In such a case, Tools > Developer > Profile Plugins after this has happened would show you amongst its output the list of plugins that trigger on_load type events.

0 Likes

#3

Thanks @OdatNurd. You are right, in safe mode, with syntax specific settings for python I get the desired behaviour.

Coming back to normal (?) mode, view.settings().erase('rulers') does make the expected rulers appear. But when I close the file and reload it from the sidebar, I am back to only one ruler at 79.

Disabling one plugin at the time from the on_load list, I have isolated the problem to the Python Flake8 Lint.Flake8Lint plugin. Setting "set_ruler_guide": false, for this plugin resolved the problem. Thanks.

1 Like