Sublime Forum

CursorRuler - Marks cursor position with dynamic rulers


Hi everyone! I created a plugin that addresses the lack of column highlighting in Sublime Text.

Currently trying to get it into Package Control.

Feedback is encouraged,

UPDATE (2013-02-21):
CursorRuler is now available through Package Control!


Cursor line/column
What plugins work with ST3?
Column Highlight
How to config it to highlight current indent guide?
Can we please have an option for a block cursor?

Doesn’t seem to work in Sublime Text 2…

Traceback (most recent call last): File "./", line 210, in on_deactivated File "./", line 154, in run_timed_function File "./", line 209, in <lambda> File "./", line 199, in on_deactivated File "./", line 152, in is_enabled AttributeError: type object 'CursorRuler' has no attribute 'enabled'



Thanks! I made an update so hopefully you won’t be seeing those errors anymore.



Sweet! Thanks for the super fast fix. This looks cool.
It seems I have to restart Sublime Text whenever I change my cursor settings, though. Any chance it could use settings().add_on_change to update automatically? :smile: Sorry I’m so demanding!



Oh, wait, it is using add_on_change… why is it not updating? How strange.



Oh, I see! It looks like the rulers only update when a view is re-activated. I just need to switch to another view and switch back and everything’s good.



Also, this is really cool. Thanks!



Yes, good point! After you save changes to your user settings or your CursorRuler settings the changes take effect once the cursor state changes. I’ve updated my README to note this behavior.

Also, thanks ! :smile:


Also, thanks for the settings file improvements. I merged them in.



Oh…wow…I like this. Why has no one thought of this before. Thanks for this.



Much appreciated! I’m glad you like it.



could you turn ruler into a dotted line,just like editplus。 a real line make me distracting。



I want to be able to do that too but to the best of my knowledge Sublime Text currently can only do solid lines for rulers. If and when it gains that capability then I’ll be able to incorporate it into CursorRuler.



I am using CursorRuler and am happy with it. Perhaps someday there will also be a CursorHorizontalRuler plugin, or additional options within CursorRuler. For anyone who needs additional visual aids, there is the BlockCursor plugin, and also the following modifications that do not require a plugin:

To change the caret / cursor from a vertical line to an underscore, this is the user profile line of code:

"inverse_cursor_state": true,

One can also change the color of the caret / cursor in the applicable theme file:

<key>caret</key> <string>#FF0000</string>



Thank you for the kind words and tips! I’m slowly working on new things for CursorRuler. I’ll say more when the time is right.



While Cursor Ruler certainly helps with this, I can’t help but feel like this should really be a built-in setting. I would much rather have the column highlight (or ruler) be as thick as the row highlight and similarly affect only the background. Using cursor ruler somewhat like an outline at the moment and it works well (kudos to the dev) but it’s more distracting than the row highlight.



I completely agree with some sort of built-in support. There were some things I wanted to do with CursorRuler but couldn’t because of API limitations. For example, line styling (e.g. dotted, dashed, etc.). In a perfect world the core functionality of my plugin would be built-in and hackable through a nice API. But, alas :smile:

CursorRuler can be made thicker to simulate full column highlighting or as thick as you need to match your row highlight. The 4th example in the description of the cursor_rulers setting is one way of doing it:

  "cursor_rulers": [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]

Despite being awkward, there is a way to change the ruler colors as described here. If you set the color to match your row highlight or even to a more subtle level I bet that would help alleviate it being distractive.



Dear icylace

I just want to thank you it !!!
Works fine for me 75 years old and had dificulties to see wheter
everything was spaced according to the rules.

1 Like


How to display the Row hair? Thanks.



Row hair? If I understand you correctly you may be interested in a preference setting Sublime Text has called highlight_line.

"highlight_line": true,
1 Like


sorted. Thanks.