Not sure how many of you use Notepad++ to write your batch files but I find it very convenient for the syntax highlighting.
I was writing a new script today and noticed that it was not syntax highlighting some of the commands. Specifically the PUSHD, POPD & TITLE commands.
I went back and opened up a few other scripts I had written with N++ and the PUSHD & TITLE commands were highlighted but the POPD command was not.
I opened up another batch file and noticed SETLOCAL was not highlighted but in another batch it was.
All the file extensions are .BAT and the language is set for Batch in N++. I am completely stumped as to what the problem is.
Anyone else run into this issue?
Notepad++
Moderator: DosItHelp
Re: Notepad++
I have N++ loaded but don't regularly use it
Can you post an example where the commands are not highlighted?
Can you post an example where the commands are not highlighted?
Re: Notepad++
I always use n++ to write batch files,
The highlighting depend on the style configuration, from the setting menu, try change the style for the batch files, i use zenburn and the setlocal, popd, and pushd is highlighted, but the set command and for and also many commands is just white color.
you can set the style by yourself.
The highlighting depend on the style configuration, from the setting menu, try change the style for the batch files, i use zenburn and the setlocal, popd, and pushd is highlighted, but the set command and for and also many commands is just white color.
you can set the style by yourself.
Re: Notepad++
There are keywords and patterns to match for syntax highlighting. I tried out some different editors but each of them failed in some points.
E.g. N++ has problems with command concatenations
@echo off & setlocal
Echo is the keyword and the string next to it is parsed as the output of echo. Hence setlocal isn't highlighted.
set a=b &rem My comment.
Rem is a keyword but &rem isn't matched. Works with a space between & and rem.
I prefer more discreet highlighting. N++ is too colorful in my opinion. I use PSPad which - of course - failes as well in more or less the same cases
Regards
aGerman
E.g. N++ has problems with command concatenations
@echo off & setlocal
Echo is the keyword and the string next to it is parsed as the output of echo. Hence setlocal isn't highlighted.
set a=b &rem My comment.
Rem is a keyword but &rem isn't matched. Works with a space between & and rem.
I prefer more discreet highlighting. N++ is too colorful in my opinion. I use PSPad which - of course - failes as well in more or less the same cases

Regards
aGerman