Home Download Buy Blog Forum Support

Javascript Highlight (Fail?)

Javascript Highlight (Fail?)

Postby CrabDude on Mon Feb 06, 2012 2:37 am

First, Sublime Text 2 is awesome. Thanks x 1000.

Just a couple questions / issues with Javascript highlighting that I wanted to see if they should be working, have plans to get them to work, or somebody could direct me to where I could maybe add functionality myself:

1. "this" is not highlighted - seems like "this" should be in there already, so maybe this is a bug
2. function params are highlighted in declaration, but highlighting doesn't persist within function scope:
Code: Select all
function (a <-- orange) {
   ++a; <-- not orange

3. The same goes for function names (default, neon green) not persisting.
4. Likewise for "var"s.

Again, I might be able to add support for these myself, if they're currently not implemented, but intend to be, but I just wanted to make sure I wasn't missing something obvious / there's not already a Javascript Syntax Highlighter Package that has implemented these.

Adam Crabtree
Posts: 7
Joined: Mon Feb 06, 2012 2:23 am

Re: Javascript Highlight (Fail?)

Postby facelessuser on Mon Feb 06, 2012 3:11 am

The syntax highlighting doesn't track variables and their highlights, it just uses regex to highlight things under certain rules. So, in javascript, the function declaration variables are targeted as orange, and normal variables are not.
Posts: 1781
Joined: Tue Apr 05, 2011 7:38 pm

Return to General Discussion

Who is online

Users browsing this forum: adavsko and 37 guests