SlickEdit Community
SlickEdit Product Discussion => SlickEdit® => Topic started 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
-
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
-
Yes, I configured a new extension called log and then a lexer, also called log.
-
Oh..sorry. Now I got it. The colorizer settings are global and apply to all lexers.
HS2
-
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)
-
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
-
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.