简体   繁体   中英

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM