Hi,
for those of you that use the jEdit editor, I've just made big improvements to the batch.xml edit mode definition file.
Basically this includes everything added in cmd.exe, that was not in command.com!
I've also included support for many of the tricky - I meant advanced - things done on this forum. (Ex :: or :# comments, echo(messages, etc.)
This batch.xml file goes into "C:\Program Files\jEdit\modes\". (Save the initial one there first just in case )
Then on the main jEdit menu, click 'Utilities' -> 'Troubleshooting' -> 'Reload Edit Modes'.
I intend to submit it to the jEdit team for inclusion in the next version of the editor.
But before that, I'd appreciate if other people could give it a try, and tell me how it works on their favorite scripts.
Thanks,
Jean-François
Batch syntax colorizer for the jEdit editor
Moderator: DosItHelp
Batch syntax colorizer for the jEdit editor
- Attachments
-
- batch.zip
- jEdit batch language edit mode definition file
- (5.6 KiB) Downloaded 350 times
Re: Batch syntax colorizer for the jEdit editor
Well colorization is a matter of taste, i think.
You should list all implemented features ("I've also included support for many of the tricky ") instead of giving only 3 examples.
Although i've new to jEdit (if i remember right this is the first time i heard of it), i think the actual implementation is better, because for example text behind ":labels" are not always comments, and easily could be executed:
The actual colorization reflects this possibility while yours gives no hint of such a possibility.
You may change the colorization behaviour depending of "^" min the line before (and use both: old and new colorization).
You may also display red color for calls like this (crashes the CLI under Windows 10):
(But i'm not rembering all possible "crash commands".)
In addition your colorization of "off" in "echo off never reached" is wrong.
penpen
You should list all implemented features ("I've also included support for many of the tricky ") instead of giving only 3 examples.
Although i've new to jEdit (if i remember right this is the first time i heard of it), i think the actual implementation is better, because for example text behind ":labels" are not always comments, and easily could be executed:
Code: Select all
@echo off
:bye ^
echo Bye. & goto :eof
call ^
:#fun & call ^
::bye & goto :eof
echo Fun with batch.
goto :eof
:bye
"%~f0"
echo off never reached
call :test param1 param2
call "%~f0" param1 param2
:: or
:# comments
echo(messages, etc
You may change the colorization behaviour depending of "^" min the line before (and use both: old and new colorization).
You may also display red color for calls like this (crashes the CLI under Windows 10):
Code: Select all
call ^
something
In addition your colorization of "off" in "echo off never reached" is wrong.
penpen