Home Download Buy Blog Forum Support

Inconsistent coloring in 2126 and 2135

Inconsistent coloring in 2126 and 2135

Postby mizwo on Fri Oct 28, 2011 12:52 pm

first of all I want to say Sublimbe Text 2 is an awesome editor. Have been using it since yesterday and I'll definetely convince by boss to buy me a license, because this peice of sofware is what I've been searching for a long time.
There's some weird behaviour in coloring in this Javascript file though. This is not color scheme specific. I doubt that this is intended behaviour, so I hereby report it. See //comments


Code: Select all
var namespace = {};

namespace.SomeClass = function() {
   this.method = function() {};

   this.property = "doing"; // no colouring for "this" before properties?

   this.func3 = function() {

    // why "method" different color when calling than
    // when creating (on top)? Why "this" no coloring?

   this.someObj.doSome = function() { // even weirder coloring

Keep it up!


ps. the code folding triangles are not positioned at the right places either. I know 2135 is a dev build ...
Posts: 12
Joined: Fri Oct 28, 2011 12:31 pm

Re: Inconsistent coloring in 2126 and 2135

Postby facelessuser on Fri Oct 28, 2011 3:35 pm

It is quite consistent. The regex to color the function deceleration is "green" (parent members will be blue) and functions actually being called are blue (parent members are not distinguished in this case).

These things can be tweaked in the javascript language file, the colors are simply based off of searching for patterns with regex and then applying a scope to the found targets. If you prefer the deceleration and the call to be the same color, then I would suggest modifying the scope in your language file or change the color of the scope of the deceleration in your theme file. You could also rewrite the regex patterns to search and identify targets how you like.

Highlighting is kind a personal preference thing. I know some people who don't like too many colors and like to have things only minimally highlighted, also, I know people that like everything distinguished. I guess if enough people agree, you might be able to get it changed across the board, but I believe that unless the highlighting is blatantly flawed, you might have an easier time just modifying it and offering it has an alternative to the default highlighting.
Posts: 1781
Joined: Tue Apr 05, 2011 7:38 pm

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 28 guests