Home Download Buy Blog Forum Support

Syntax Highlight Current Scope Only

Syntax Highlight Current Scope Only

Postby mrsean2k on Wed Dec 25, 2013 12:46 am

Is it possible to apply syntax highlighting to the enclosing scope for the current line only, keeping the rest muted or monochrome?

Code: Select all
001    if ($scope.phase === 'ADDDESCRIPTION') {
002        if (!$scope.ad.classifiedData.Common.Title || ($scope.ad.classifiedData.Common.Title.length < 4)) {
003            $scope.generalAlerts.push({
004                type: 'danger',
005                msg: 'You must enter a Title of between 4 and 80 characters'
006            });
007
008            errorCount +=1 ;
009        }
010    }



For instance in the snippet above, if the cursor is on line 004, syntax highlighting extends from 003 - 006.

If the cursor is moved down to line 008, highlighting extends from 002 - 009; up to 001, and 001 - 010 are covered.

I quite often find I want to concentrate on a small section of code, but see it in a wider context. This would help to retain focus as I move to the specific section.
mrsean2k
 
Posts: 2
Joined: Wed Dec 25, 2013 12:23 am

Re: Syntax Highlight Current Scope Only

Postby mrsean2k on Sun Dec 29, 2013 1:25 pm

This is the sort of thing, but at a finer grained level. Something for me to take a punt at anyway

https://sublime.wbond.net/packages/Expa ... JavaScript)
mrsean2k
 
Posts: 2
Joined: Wed Dec 25, 2013 12:23 am

Re: Syntax Highlight Current Scope Only

Postby amendoza on Mon Aug 11, 2014 7:49 pm

Was there a solution to this? I'm interested in a similar feature.

Thanks!
amendoza
 
Posts: 1
Joined: Mon Aug 11, 2014 7:48 pm


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 17 guests