Syntax highlighting for Katepart (KDE)
-
- Posts: 4
- Joined: May 27, 2005 11:10
- Location: Germany
Syntax highlighting for Katepart (KDE)
Hi@all!
I want to announce a syntax highlighting file for Katepart, an editing module which is used by many KDE applications like Kate, KWrite, KDevelop, Krusader etc.
I hope it features (nearly) the complete syntax of FreeBASIC, up to the CVS version. It has been written for (and tested with) KDE 3.3.2/Kate 2.3.2, for other versions of KDE/Kate(part) I don't know if it works correctly, but I think for newer versions there should be no problem.
To install it, download this XML file (by right-clicking) and copy it either to ~/.kde/apps/katepart/syntax (maybe it has to be created first) or to /usr/share/apps/katepart/syntax (usually needs root privilegies, may differ on some distributions [e.g. /opt/...]). Then it can be selected under "Tools -> Highlight Mode -> Sources -> FreeBASIC" in Kate, for example (I'm not sure about this, because I don't know the english translation of KDE).
I'm sure there are many flaws with this syntax file, and I'm not very comfortable with XML or especially "regular expressions", so any clues for improvements, bug reports or other suggestions would be very appreciated :-)
I thought it would be a good idea to reflect the version of FreeBASIC which is considered in the hightlighting file, so the initial version was 0.15b-1.
Lastest changes (version 0.15b-2):
- fixed typo in "nokeyword"
- added missing "__" to "__DATE__"
- added "#elseif", "'$libpath" and "#libpath" to preprocessor directives
- added "ASSERTWARN" to functions
- added new functions "VALLNG", "VALUINT" and "VALULNG" from cvs
- added highlighting of "ASM" blocks (no asm keywords, just everything between "ASM" and "END ASM" or behind "ASM" for oneliners)
Greetings and have fun!
PS: If my english sounds strange, I want to apologize for it :-)
I want to announce a syntax highlighting file for Katepart, an editing module which is used by many KDE applications like Kate, KWrite, KDevelop, Krusader etc.
I hope it features (nearly) the complete syntax of FreeBASIC, up to the CVS version. It has been written for (and tested with) KDE 3.3.2/Kate 2.3.2, for other versions of KDE/Kate(part) I don't know if it works correctly, but I think for newer versions there should be no problem.
To install it, download this XML file (by right-clicking) and copy it either to ~/.kde/apps/katepart/syntax (maybe it has to be created first) or to /usr/share/apps/katepart/syntax (usually needs root privilegies, may differ on some distributions [e.g. /opt/...]). Then it can be selected under "Tools -> Highlight Mode -> Sources -> FreeBASIC" in Kate, for example (I'm not sure about this, because I don't know the english translation of KDE).
I'm sure there are many flaws with this syntax file, and I'm not very comfortable with XML or especially "regular expressions", so any clues for improvements, bug reports or other suggestions would be very appreciated :-)
I thought it would be a good idea to reflect the version of FreeBASIC which is considered in the hightlighting file, so the initial version was 0.15b-1.
Lastest changes (version 0.15b-2):
- fixed typo in "nokeyword"
- added missing "__" to "__DATE__"
- added "#elseif", "'$libpath" and "#libpath" to preprocessor directives
- added "ASSERTWARN" to functions
- added new functions "VALLNG", "VALUINT" and "VALULNG" from cvs
- added highlighting of "ASM" blocks (no asm keywords, just everything between "ASM" and "END ASM" or behind "ASM" for oneliners)
Greetings and have fun!
PS: If my english sounds strange, I want to apologize for it :-)
Last edited by GrobiMonster on Aug 02, 2005 9:23, edited 1 time in total.
-
- Posts: 142
- Joined: May 27, 2005 6:13
tried it
tried it and it works great. It does most of the highlighting and stuff. Thanks
-
- Posts: 4
- Joined: May 27, 2005 11:10
- Location: Germany
Thanks for feedback and your offer, jofers!
I have prepared a new version of the highlighting file, which fixes a few bugs and adds new detections. To upgrade download the XML file and replace the old one.
Changes in Version 0.15b-2:
- fixed typo in "nokeyword"
- added missing "__" to "__DATE__"
- added "#elseif", "'$libpath" and "#libpath" to preprocessor directives
- added "ASSERTWARN" to functions
- added new functions "VALLNG", "VALUINT" and "VALULNG" from cvs
- added highlighting of "ASM" blocks (no asm keywords, just everything between "ASM" and "END ASM" or behind "ASM" for oneliners)
Greetings!
I have prepared a new version of the highlighting file, which fixes a few bugs and adds new detections. To upgrade download the XML file and replace the old one.
Changes in Version 0.15b-2:
- fixed typo in "nokeyword"
- added missing "__" to "__DATE__"
- added "#elseif", "'$libpath" and "#libpath" to preprocessor directives
- added "ASSERTWARN" to functions
- added new functions "VALLNG", "VALUINT" and "VALULNG" from cvs
- added highlighting of "ASM" blocks (no asm keywords, just everything between "ASM" and "END ASM" or behind "ASM" for oneliners)
Greetings!
Continue to upgrade it...
Works great! Thanks for the updates.
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
-
- Posts: 680
- Joined: May 28, 2005 1:11
- Contact:
:( can't find it....
[edit] nvm was having connection issues
[edit] nvm was having connection issues
Last edited by dumbledore on Jan 15, 2006 8:31, edited 1 time in total.
Hi,
The highlighting plugin is a really neat add-on. Thank you!
However, I would like to point two things:
1. Why are there two topics for this add-on (on in "projects", second in "linux")? I wasn't sure where to post my reply...
2. The following lines are misinterpretated:
FUNCTION RemoveStuff
REM Blah blah blah:
The highlighting plugin is a really neat add-on. Thank you!
However, I would like to point two things:
1. Why are there two topics for this add-on (on in "projects", second in "linux")? I wasn't sure where to post my reply...
2. The following lines are misinterpretated:
FUNCTION RemoveStuff
REM Blah blah blah: