Sublime Forum

Text area illumination (quasi-permanent highlighting)

#1

I am new here so let me start off by expressing how much I love Sublime. Its beautiful syntax coloring is its own reward for typing and its rich configuration of settings makes it a toy with endless surprises. Now if only I could print out one of those colorful pages, I would use it for everything!

Very often an unfinished script or a buggy area of code requires commentary sections to provide a point of reference to yourself or someone else to revisit, and more often times than not, it’s entangled in a web of other comments. This suggests a pain point that I think many people experience: finding where we left off or which area we last spotted a bug. I think it was John Resig who once wrote that the first thing he does when he starts coding, is take a few minutes to remember where he’d left off before. I know if it were me, those minutes could turn into hours in a few blinks.

That being said, I think there is a missing functionality that Sublime users can all benefit from in the long run. That is, highlighting an area or line of text and transforming its underlying color scheme to that of an opposite background contrast. For example, I’m using the Monokai color scheme and so maybe I’d prefer Dawn to be the color scheme for areas or comments that require my immediate attention. Or maybe even a new flashy red background color scheme for alerts would be useful.

Yay or nay? Any suggestions as to how this can be packaged? I’m a newbie programmer and my fingers only speak JavaScript!

0 Likes

#2

 
Try: BufferScroll

It opens documents @ their previous viewport locations & retains folded regions + selections.

 

 
Try: HighlightWords

You can use the permanent_highlight_keyword_color_mappings array to create custom colored regions:

 
Here is the permanent_highlight_keyword_color_mappings RegEx entry used in the example:

{ "keyword": "(?s)//ERROR_START.*//ERROR_END", "color": "invalid", "flag": 0 },
3 Likes

Change text color regardless of syntax?
#3

Awesome! Both of those plugins are suffice. Thank you, fico!

1 Like

#4

The name “HighlightWords” is insanely misleading if it will allow regex patterns whose matches span multiple lines :wink:

0 Likes