Bug 199527 - Support for MS DOS/Windows batch files syntax, other syntaxes
Summary: Support for MS DOS/Windows batch files syntax, other syntaxes
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: syntax (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-09 09:27 UTC by Andrew Udvare
Modified: 2011-08-12 08:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
.bat highlighter (10.23 KB, text/xml)
2009-08-04 01:37 UTC, Matthew Woehlke
Details
.bat highlighter, updated (13.47 KB, application/xml)
2010-03-27 01:51 UTC, Matthew Woehlke
Details

Note You need to log in before you can comment on or make changes to this bug.
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