kwrite SLKBUILD syntax highlighting

Other talk about Salix
Post Reply
User avatar
pwatk
Posts: 474
Joined: 14. Mar 2010, 23:56
Location: United Kingdom

kwrite SLKBUILD syntax highlighting

Post by pwatk »

I decided to install the KDE edition a few days ago after I had to wipe my HDD to fix some bad sectors.

I never thought I'd say this but I'm really impressed with how far KDE4 has come and apart from a few niggles I'm totally sold.

Can anyone tell what I need to do to for kwrite to provide syntax highlighting for SLKBUILD files? I know I can do this manually using the advanced mode but it gets really annoying after a while.

Thanks.
Image
djemos
Salix Warrior
Posts: 1464
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: kwrite SLKBUILD syntax highlighting

Post by djemos »

Create a new base file for SLKBUILD with
cp /usr/share/apps/katepart/syntax/bash.xml /usr/share/apps/katepart/syntax/slkbuild.xml
open with kwrite the slkbuild.xml and
change line 11 from <language name="Bash" to <language name="slkbuild"
add in line 12 the SLKBUILD
line 12 is as
extensions="*.sh;*.bash;*.ebuild;*.eclass;.bashrc;.bash_profile;.bash_login;.profile"

So line 12 extensions will be as
extensions="SLKBUILD;*.sh;*.bash;*.ebuild;*.eclass;.bashrc;.bash_profile;.bash_login;.profile"

Save the file and restart kwrite with a SLKBUILD file.
You will see it syntax highlighting
User avatar
pwatk
Posts: 474
Joined: 14. Mar 2010, 23:56
Location: United Kingdom

Re: kwrite SLKBUILD syntax highlighting

Post by pwatk »

Thanks :)
Image
User avatar
zAchAry
Posts: 804
Joined: 11. May 2010, 09:02
Location: Israel

Re: kwrite SLKBUILD syntax highlighting

Post by zAchAry »

I wanted to write this earlier, but, IMHO, it's not appropriate to do it before a relevant and a specific answer (+ solution, if there's) was given.

SLKBUILD syntax:
Geany and SLKBUILD http://www.salixos.org/forum/viewtopic.php?f=32&t=512
Image
Help to make Slackware easier Donate to Salix
User avatar
pwatk
Posts: 474
Joined: 14. Mar 2010, 23:56
Location: United Kingdom

Re: kwrite SLKBUILD syntax highlighting

Post by pwatk »

I stopped using KDE afew weeks ago and geany does funny things with indentations (which really annoys me) so I've returned to using vim. If in doubt use a proper editor :D.
Image
Post Reply