Sublime Forum

Unable to have the Ruler at 60 (70 min)

#1

Hi

I’m tidying up my code, and I’d like to get my short comments all in a nice line, but I can
only set the ruler to a min of 70.

It’d be very handy to have it user defined.

I’ve tried putting

"rulers": [60],

in my preferences file, but to no avail. 70 is too much.

Cheers

0 Likes

Edge effects
#2

I can’t reproduce that here; I can have any many rulers as I want and at any position that I want:

0 Likes

#3

I tried something similar to no avail, however i gave it another go and got this

If you notice, the rulers have appeared in the build dialog box and not the main ‘coding section’

I’ve checked the control panel (ctrl+`) but no errors there except the usual:

warning: mnemonic k not found in menu caption Save Copy As…

0 Likes

#4

The settings are sensitive to the file you put them in; if you put them in the global Preferences.sublime-settings, they apply everywhere, if you put them in syntax specific settings they only apply to files of that type, if you apply them in your project they apply to files in that project, etc.

It looks like you either applied them to the syntax that’s being used in the build system (which defaults to plain text) or you have syntax specific settings applied to the hpp files that are overriding the global preference.

0 Likes

#5

I went to preferences -> settings -> user and pasted this line in

"rulers": [30,40,50,60],

that’s all I’ve done.

Cheers

0 Likes

#6

Your syntax specific settings may be overriding your global preferences.

0 Likes

#7

Everything is more or less out of the box, I don’t know any python, so haven’t installed any python stuff.
All i’ve done is tinkered with so colours and a theme. Other than than it ST3 out the box. Only a few packages installed (10, most are the min recommended, package dev, package control PRV. Only ‘wierd’ ones possibly is Diffy and side bar enhancements (which doesn’t work along with save copy as) rainglow, jack language do dah…)

(I’ve used it for about 150 hrs and spent approx 28 to 76 hrs trouble shooting based on this forum’s stats which now I’ve actually done that estimate is terrifying. I got it in December last year and use it a day a week. Been using it more recently so let’s say 200 hrs. That seems like a huge set up time…)
(79 posts, conservatively that’s 10 mins to write the post, 20 mins encountering the problem, trying to solve, searching internet etc etc with the upper end doubling those figures. Maybe I made a few cups of tea too)

0 Likes

#8

You can type view.settings()['rulers'] into the console to confirm what the actual setting on the opened file is.

0 Likes

#9

Just a quicky, before answering your next question, on reboot this morning, one of my opened files had the rulers where expected, however the file that was open when I changed the rulers, still remains at 70 with no other rulers…

0 Likes

#10

view.settings()[‘rulers’]
Traceback (most recent call last):
File “”, line 1, in
TypeError: ‘Settings’ object is not subscriptable

ps In the “wrong” (and unexpected) file with the rulers working there’s no output after inputting view.settings()['rulers'] into the control panel, perhaps not unexpectedly.

0 Likes

#11

No output at all? It should be outputting the following if no rulers are set:

>>> view.settings()['rulers']
[]

Otherwise you’re not using the console. You can open it using ctrl + ` or View > Show Console.

0 Likes

#12

I think the issue there is that this is a ST4 feature but I suspect that Lozminda is using ST3.

0 Likes

#13

Ah, sorry for the confusion. It should be view.settings().get('rulers'). Still an error message should appear, not “no output”.

0 Likes

#14

Good news. ST3 has just ‘sorted it’s self out’ after several turnings (say 4) off and on of my machine.

The ruler didn’t work, then it worked in other windows, but not the window I wanted, then in other panels but not the panel I wanted, then a couple of days ago I had a ruler at 60. (I’ve now got tidy comments, phew)

I mean I like problems that sort themselves out, but it’s a little weird maybe.? Anyway all good, @OdatNurd you are indeed correct, sir.

Cheers

Ps Just for completeness, I popped into the console (ctrl+`)

view.settings().get(‘rulers’)

and got
[65]

which is what it’s set to. (i know I’ve been saying 60, my bad)

0 Likes

#15

PPs I include this as a separate because, having just done a little coding, I do have some random line in the build dialog box however…

0 Likes