Bracket highlighting while line is commented out
Moderator: kfury77
Forum rules
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.
- Do not create new topics for already requested features. Add your comments to the existing feature request topics instead;
- Create separate topic for each feature suggestion. Do NOT post a number of non-related feature suggestions in a single topic;
- Give your topic a meaningful title. Do NOT create topics with meaningless titles, such as "My Suggestion" or "My Problem".
-
- Posts: 15
- Joined: Mon Jul 12, 2010 9:28 pm
Bracket highlighting while line is commented out
It would be useful if matching brackets and parenthesis were highlighted inside commented code (when you place your cursor next to one). Sometimes you have to copy out a block from a very large piece of commented code, and it is also just a useful feature to more easily read large pieces of commented code. However, I'm not suggesting full syntax highlighting of commented code... that would just make everything else harder to read.
Re: Bracket highlighting while line is commented out
But what if I comment out code I do not want to be noticed by the bracket highlighter? A option must be needed to de- and activate the recognition of brackets in comments.
Re: Bracket highlighting while line is commented out
Have to say -1 for this.
If I comment out some code it's because I don't want anything to recognise it, how would the following situation be handled for example:
Highlighting the brackets would end up in miss-matched brackets.
Actually, just tested this in WeBuilder and it does highlight the brackets in the comment, and never highlights the brackets on the 1st line. Not noticed this before.
Can be seen in this screenshot:
If the image doesn't show try this link: http://sites.google.com/site/swindonmike/comments
If I comment out some code it's because I don't want anything to recognise it, how would the following situation be handled for example:
Code: Select all
if (test != 1) {
// if (test == 1) {
alert("test is not 1");
}
Actually, just tested this in WeBuilder and it does highlight the brackets in the comment, and never highlights the brackets on the 1st line. Not noticed this before.
Can be seen in this screenshot:

If the image doesn't show try this link: http://sites.google.com/site/swindonmike/comments
Re: Bracket highlighting while line is commented out
This is interesting as I do not get the same as you do

as you can see the comment line has a curly bracket BUT it is in a different from or style
the curly brackets are highlighted correctly as seen in the image

as you can see the comment line has a curly bracket BUT it is in a different from or style
the curly brackets are highlighted correctly as seen in the image
Re: Bracket highlighting while line is commented out
The green highlighting of brackets - means the brackets are highlighted using special algorithm, and the data is used also in code collapse (if there is added support for this inside the editor). And this does not work in strings or comments (at least it should not work).
The blue highlighting currently works also for brackets inside strings or comments, the data for these brackets is not used in code collapse.
We possibly could add an option for highlighting brackets in blue color inside comments or not, but currently this seems not a job of high priority.
Currently JavaScript embedded in HTML and simple JavaScript files work a bit differently. That is why Mikey sees a different picture, I guess.
With next version we will have code collapse also for JavaScript files, and then it will work similarly on both cases.
Still, it is strange that Mikey has character "{" highlighted no as a comment. Maybe the parser has been modified.. ? Try resetting it as described here:
http://forums.blumentals.net/viewtopic. ... 444#p16444
The blue highlighting currently works also for brackets inside strings or comments, the data for these brackets is not used in code collapse.
We possibly could add an option for highlighting brackets in blue color inside comments or not, but currently this seems not a job of high priority.
Currently JavaScript embedded in HTML and simple JavaScript files work a bit differently. That is why Mikey sees a different picture, I guess.
With next version we will have code collapse also for JavaScript files, and then it will work similarly on both cases.
Still, it is strange that Mikey has character "{" highlighted no as a comment. Maybe the parser has been modified.. ? Try resetting it as described here:
http://forums.blumentals.net/viewtopic. ... 444#p16444
Kind regards,
Gatis Avots
Gatis Avots
Re: Bracket highlighting while line is commented out
Hi Gatis,
I followed the instructions in the link, it reset the syntax colours, but still the { in the comment is highlighted:

As you say, JavaScript within an HTML file works better:

I followed the instructions in the link, it reset the syntax colours, but still the { in the comment is highlighted:

As you say, JavaScript within an HTML file works better:

Re: Bracket highlighting while line is commented out
This is interesting, I took the code and placed it within JavaScript and as you can see matching brackets are highlighted whereas the comment line does not higlight the italic bracket

