I'm trying to change the comment line style in TEX language in NPP.
The comment line begins with a "%" sign in TEX and the default style for TEX only changes the first "%" into some color format and leaves everything else as default text (no color).
I also notice that when I use CPP language in NPP, as long as I type in "//" for comment, the whole line will change into green color and that, is exactly what I need in a TEX language.
Could anyone tell me how to do that? I mean, change the whole comment line color in TEX leaded by a "%".
Thank you very much.
Regards,
Richard
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
By default, the TeX lexer does not process comments.
Using a macro or scripting language of your choice (with the matching plugin), send Scintilla the SCI_SETPROPERTY message, setting the "lexer.tex.comment.process" property to 1 (true).
Guess I'll write a wiki page on all those properties in lexers and how to set it in various ways, as more than a few posts here involve them.
CChris
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for your reply. However, I don't understand scripting language very well. Can I do this in NppEexc by adding some command lines? If yes, what is the code? Or, is there any way that I can achieve this just by change some files in the NPP install folder? Thank you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I'm trying to change the comment line style in TEX language in NPP.
The comment line begins with a "%" sign in TEX and the default style for TEX only changes the first "%" into some color format and leaves everything else as default text (no color).
I also notice that when I use CPP language in NPP, as long as I type in "//" for comment, the whole line will change into green color and that, is exactly what I need in a TEX language.
Could anyone tell me how to do that? I mean, change the whole comment line color in TEX leaded by a "%".
Thank you very much.
Regards,
Richard
By default, the TeX lexer does not process comments.
Using a macro or scripting language of your choice (with the matching plugin), send Scintilla the SCI_SETPROPERTY message, setting the "lexer.tex.comment.process" property to 1 (true).
Guess I'll write a wiki page on all those properties in lexers and how to set it in various ways, as more than a few posts here involve them.
CChris
Hi CChris,
Thank you for your reply. However, I don't understand scripting language very well. Can I do this in NppEexc by adding some command lines? If yes, what is the code? Or, is there any way that I can achieve this just by change some files in the NPP install folder? Thank you.
Workaround:
Change the stylers.xml file in c:\Users\<user>\AppData\Roaming\Notepad++\ (as described by fallino on http://sourceforge.net/p/notepad-plus/discussion/331754/thread/ecd1c591):</user>
Change the property "fgcolor" of the "DEFAULT" style (I changed it to grey---808080):
Worked for me on Windows 7, NPP v6.4.5.