PDA

View Full Version : BBCode Syntax Highlighter for KDE



Ernir
2012-02-01, 08:26 PM
Disclaimer: This is not RP stuff, this is stuff to make it easier to write+post RP stuff. And for those of you not on Linux, it is all useless.
When I homebrew, I routinely make posts that are too complicated format-wise for the forum editor to handle decently. I usually create these posts as plain text files, to give me a more powerful working environment, and then copy them into the forum window. I am sure many people here do similar things, which is why I posted this here.

One thing I have missed from real markup languages, however, is syntax highlighting. So I wrote some for my editor of choice, Kate. Now, I doubt many of you are on Linux, and many of those who do are probably not using KDE, and many of those are probably not even using Kate, but I made it, so I might as well share it. :smalltongue:

Here it is. (http://dl.dropbox.com/u/19444168/bbcode.xml) It is an .xml file, containing the highlighting instructions. Again, this works for the Kate editor only.

To use it, do the following:
Download the .xml file, above.
Place it in Kate's "syntax" directory. On my system, this is the /usr/share/kde4/apps/katepart/syntax/ directory. You may need root privileges.
Give the file that stores your post a file name extension of ".bbcode".
Open the file with Kate.

If everything worked, the file should have changed from looking like this (http://i.imgur.com/fx9A7.png) to looking like this (http://i.imgur.com/iRhDC.png). I, for one, think the latter is much easier to work with.

As for those of you on other operating systems, sorry for wasting your time. :smalltongue:

Tenno Seremel
2012-02-02, 09:29 AM
You can save that to ~/.kde/share/apps/katepart/syntax instead so you don't need root privileges.

Ernir
2012-02-02, 02:33 PM
You can save that to ~/.kde/share/apps/katepart/syntax instead so you don't need root privileges.

Great point. No reason to do it system-wide if you don't have to.