Home Download Buy Blog Forum Support

Dim out code

Dim out code

Postby belugacat on Tue Sep 10, 2013 10:31 pm


Would it be feasible to dim out code that's not in the current scope, as follows:


(a bonus would be to also dim out the minimap)

I'm willing to write the plugin myself, I just have no experience whatsoever doing so and would like to know if it's possible before diving in :)

Posts: 1
Joined: Tue Sep 10, 2013 10:21 pm

Re: Dim out code

Postby adzenith on Tue Sep 10, 2013 10:39 pm

Not (really) possible. The text color comes from the language file and can't be changed without changing the language definition. The only way to do it would be to recreate and reload the language file every time and use regular expressions to mark off all out-of-scope text.

This is one of those sadly gaping holes in the ST api. Someday...!
Posts: 1403
Joined: Mon Oct 19, 2009 9:12 pm

Re: Dim out code

Postby supergra on Tue Sep 10, 2013 10:47 pm

Darn, that would be beautiful.

Though you'd need some good heuristics to determine what scope depth to highlight. Probably don't want to look at all of a 500-line function, nor only a 2-line if-then statement. Perhaps some toggle keys to increase or decrease the depth at which it's highlighting.

Alas, apparently it is a moot point for now.
Posts: 10
Joined: Tue Sep 10, 2013 6:03 am

Re: Dim out code

Postby iamntz on Tue Sep 10, 2013 10:57 pm

Bracket highliter has this feature (sort of). Is called high visibility mode.
Posts: 1035
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: Dim out code

Postby autarkie on Tue Apr 07, 2015 10:20 am

Hi all,

I was looking for functionality in ST3 that comes close to what has been asked in this thread, so I'll post here if noone minds. I use ST3 for writing texts in Markdown. Not its primary use, I know, but it works like a charm, except for one little thing. In an editor I used previously (Writemonkey), there was a focus feature. Basically, you could select a piece of text, press F6 and the rest of the text just disappeared. It was not dimmed out, rather the selected paragraph was presented to the user in a kind of temporary space, in order to zoom in on this particular text portion and hide all other clutter from view. When done editing the selected paragraph, you'd press F6 again and all your edits would be incorporated in the original text. It was a feature highly useful for writing. I was wondering if there exists a plugin for ST3 to do something like that, or if it is possible to create such a plugin at all.

Thank you for your response.

Kind regards,
Posts: 3
Joined: Tue Apr 07, 2015 10:12 am

Re: Dim out code

Postby soapybirds on Tue Apr 07, 2015 11:23 am

Posts: 20
Joined: Tue Aug 12, 2014 6:38 am

Re: Dim out code

Postby autarkie on Sat Apr 11, 2015 11:26 am

soapybirds wrote:Try the FeaturePresentation plugin:


Thanks a lot mate, this is exactly what I was looking for.
Posts: 3
Joined: Tue Apr 07, 2015 10:12 am

Return to Plugin Development

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests