Kate text editor for smalltalkers

Tagged:

Kate is a powerful text editor. I used it in the past, but unfortunately it doesn't have smalltalk syntax highlighting and I'm a big fan of Vim.

Yesterday I gave Kate another try, and I discovered that it has a VI mode in KDE4! It was enough for me to hack it a bit :)

First I wanted to force Kate to produce the right indentation, like I did for Vim, so I added a custom filetype for smalltalk files, and added the following variables:

kate: indent-width 4; mixedindent on; tab-width 8; 

The next step was to add syntax highlighting for Smalltalk files. Writing syntax files for Kate is actually very easy, and very well explained.

The xml file is on github and has to be put in KDEDIR/apps/katepart/syntax. On my system, KDEDIR is /usr/share/kde/.

Then, (re)start Kate, and you're done!

Happy Smalltalk hacking with Kate!

patch below. formatting is screwed up but you see what I mean:

diff --git a/smalltalk.xml b/smalltalk.xml
index a62608e..32b6b8c 100644
--- a/smalltalk.xml

+++  b/smalltalk.xml

@@ -133,7 +133,8 @@ endRegion="Brackets6" />
       
 
       
-        <DetectChar attribute="String" context="#pop" char="'" />

+         <DetectChar attribute="String" context="#pop" char="'" 

+                    endRegion="String"/>
       
       
       

User login