Sublime Forum

Demarcate code blocks

#1

I would like the ability to demarcate arbitrary areas of text within a file.

Rationale:

On a long file that I’m modifying, I would appreciate the ability to demarcate the areas I am working on/interested in (which could be at various points throughout). A way of selecting and then adding a background colour to these areas for easy at a glance reference would be most welcome. The feature would do nothing more than that and if within the bounds set by a demarcation point, a simple command to ‘clear demarcation’ or ‘clear demarcation all’ would be clear the present (or all) demarcation points.

If these areas were also painted in the minimap, so much the better.

I’ve tried in vain to find a plugin that does this. Is there one, or how do users currently deal with this need?

0 Likes

#2

Sublime has bookmarks built in. These will put something in the gutter, but not highlight your text by default.

I really like the package MarkAndMove, here: github.com/colinta/SublimeMarkAndMove. It’ll do what you want, and it’s super awesome besides.

0 Likes

#3

Thanks adzenith, thanks for the plugin recommendation. It’s lacking the background color but I think this will solve the problem I have. To be honest, I’d totally forgotten about the built in Bookmarks, which probably solve the problem in a way too!

0 Likes

#4

You can change line 192 of mark_and_move.py (maybe using PackageResourceViewer) and just delete the sublime.DRAW_OUTLINED. It should then draw it filled in.

0 Likes