Bug 199527

Summary: Support for MS DOS/Windows batch files syntax, other syntaxes
Product: [Applications] kate Reporter: Andrew Udvare <audvare>
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: mwoehlke.floss, xavier.kde
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: .bat highlighter
.bat highlighter, updated

Description Andrew Udvare 2009-07-09 09:27:27 UTC
Version:            (using KDE 4.2.3)
Compiler:          GCC 4 
OS:                Linux
Installed from:    Gentoo Packages

Now that Kate has been ported to Windows especially I think it is important to support syntaxes like Windows/DOS Batch, Visual Basic (VB.NET also), VBScript, and others.

I use Wine and DosBox and encounter batch files that I would like to see some syntax highlighting when using Kate, my preferred editor.
Comment 1 Matthew Woehlke 2009-08-04 01:37:59 UTC
Created attachment 35830 [details]
.bat highlighter

Well, here's a start, no promises how complete or even non-broken this is :-).
Comment 2 Xavier Guerrin 2010-03-25 17:11:43 UTC
Hello,

@Matthew Woehlke: The dosbat.xml seems to be a good start (thanks a lot, by the way). I have just installed it along with Kate/KDE 3.5.10 (the SMB Kio/slave allowed editing these filetypes before the start of KDE 4).
However, I got warnings when the dosbat.xml was parsed by Kate: it appears this file mentions two undefined contexts (CmdIf and CmdFor) at lines 110 and 111. Commenting them out works, but I guess you intended to define these contexts?
Comment 3 Matthew Woehlke 2010-03-27 01:51:43 UTC
Created attachment 42285 [details]
.bat highlighter, updated

> However, I got warnings when the dosbat.xml was parsed by Kate: it appears this
> file mentions two undefined contexts (CmdIf and CmdFor) at lines 110 and 111.
> Commenting them out works, but I guess you intended to define these contexts?

Yes. In fact, I started tinkering with it again recently. Updated version attached. There is still a warning about CmdIf since, as you've noticed, no parsing is done for 'if' yet, but parsing for 'for' is starting to shape up.
Comment 4 Xavier Guerrin 2010-04-06 14:52:39 UTC
That new version is already much more usable. Thanks a lot :)
Comment 5 Christoph Cullmann 2011-08-12 08:45:57 UTC
Git commit 254c577f3f8e37d620741d6e8e3a0abbac7bfc6f by Christoph Cullmann.
Committed on 12/08/2011 at 10:45.
Pushed by cullmann into branch 'master'.

add MSDOS BAT hl
even if not fully working, better than nothing
BUG: 199527

A  +311  -0    part/syntax/data/dosbat.xml

http://commits.kde.org/kate/254c577f3f8e37d620741d6e8e3a0abbac7bfc6f