Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Javascript keyword highlighting

I'm playing with Sublime Text 2 recently and notified some odd Javascript syntax Highlighting:

(The words with * are hightlighted in turquoise, can't post images yet, sorry :( )

*var* height = this.parent.*height*();
*var* width = this.parent.*width*();
this.*content*.*height*(height);
this.viewBottom.*width*(width);
this.viewTp.*width*(width);

The highlighting of "content", "height", "width" is a bit strange. Obviously they are keywords, but it is confusing to mark them with a different color in this case.

Is there a way to disable or reconfigure keyword highlighting for JavaScript in Sublime Text 2?

My first attempt was to search through the JavaScript.tmLanguage file, but I'm new to Sublime and got lost in the xml structure.

Thanks in advance!

like image 968
Riplexus Avatar asked May 03 '26 04:05

Riplexus


1 Answers

You were looking at the right file to change the highlight, however, it is composed of many regex so you would have quite some trouble to disable highlight for those words and I am guessing you would like to disable it for almost every js property.

You can make sublime to open all .js files as plain text but I think you would just lose a lot so my advice is to get used to it.

In any case to disable javascript hightlighting, click at the bottom right of sublime, there should be a text Javascript (if you have a .js file open), at the menu select "Open all with current extesion files as..." -> Plain Text

Hope it helps you.

like image 154
darks Avatar answered May 04 '26 18:05

darks



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!