SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: jajohns8 on December 15, 2010, 06:12:03 PM

Title: updating lexer in one file updates different lexer for other file
Post by: jajohns8 on December 15, 2010, 06:12:03 PM
I am trying to associate one lexer with one file on the screen and a different lexer with a different file on the screen.

One file is my code, the other is a log file.

I simply want to make all the lines in my XXXX.log file with the word "ERROR" in them, highlight in red. Or just highlight the word "ERROR" in red.

I have a lexer called log that I set up for the ***.log file. Under color coding, I put ERROR in the KEYWORDS.

As soon as I hit apply, it applies this to the other file, the code file, and makes ALL the keywords in it, red.

I just want the lexer to apply to my log file, not my code file. It is somehow overwriting the other lexer for my code file. The lexer for the code file is named something different.

I am using Slickedit 12.0.2.0

Title: Re: updating lexer in one file updates different lexer for other file
Post by: hs2 on December 15, 2010, 06:26:41 PM
So you did configure a new 'log' file extension with your new 'log' lexer ?
A lexer is a part of a file extension resp. document type setup.
HS2
Title: Re: updating lexer in one file updates different lexer for other file
Post by: jajohns8 on December 15, 2010, 07:01:33 PM
Yes, I configured a new extension called log and then a lexer, also called log.



Title: Re: updating lexer in one file updates different lexer for other file
Post by: hs2 on December 15, 2010, 07:09:34 PM
Oh..sorry. Now I got it. The colorizer settings are global and apply to all lexers.
HS2
Title: Re: updating lexer in one file updates different lexer for other file
Post by: jajohns8 on December 15, 2010, 07:17:58 PM
So, I can't have a file of one type open, set to one lexer, and a file of another type open, set to a different lexer? (with different color settings for each lexer)
Title: Re: updating lexer in one file updates different lexer for other file
Post by: hs2 on December 15, 2010, 07:39:10 PM
Just the color settings are global and NOT per lexer (there is also no lexer selection in the color config dialog).
So all keywords in all open files maybe associated with different lexers have the same color. That's it.
Consider to move 'ERROR' to the 'User defined' list in the lexer and choose a dedicated color for 'User defined symbol' in the color setup.
The file type <-> lexer association is a different thing.
HS2
Title: Re: updating lexer in one file updates different lexer for other file
Post by: jajohns8 on December 15, 2010, 09:37:41 PM
Moving Error to user defined and setting the user defined symbol in color settings is getting me closest to what I want to do.

Thanks.