Can't get syntax highlighting to work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am trying to get kate to syntax highlight  for the unicon programmaing 
language, but I get no highlighting, and no messages.

I took the python.xml file and editted it (see below), then placed it in 
~/.kde/share/apps/katepart. Kate complained when there was a syntax error in 
the file, which I fixed. But it did not recognize my <filename>.icn source 
text and colour it. the Unicon syntax is in its list of possibilities, along 
with the *.icn extension filter.

I tried it with and without a 

	mimetype="text/x-unicon"

specification - ther was no difference in the result.

What else needs to be done?



-- Parzival


<?xml version="1.02" encoding="UTF-8"?>
<!DOCTYPE language>
<!-- Unicon syntax highlightning v0.2 by Parzival Herzog -->
<language name="Unicon" version="0.2" kateversion="2.1" section="Scripts" 
extensions="*.icn" mimetype="text/x-unicon" casesensitive="1">
	<highlighting>
		<list name="prep">
			<item> global  </item>
			<item> initial  </item>
			<item> local  </item>
			<item> main  </item>
			<item> procedure  </item>
			<item> record  </item>
			<item> static  </item>
		</list>

		<list name="statements">
			<item> break  </item>
			<item> by  </item>
			<item> case  </item>
			<item> create  </item>
			<item> default  </item>
			<item> do  </item>
			<item> else  </item>
			<item> end  </item>
			<item> every  </item>
			<item> fail  </item>
			<item> goto  </item>
			<item> if  </item>
			<item> link  </item>
			<item> next  </item>
			<item> not  </item>
			<item> of  </item>
			<item> repeat  </item>
			<item> return  </item>
			<item> suspend  </item>
			<item> then  </item>
			<item> to  </item>
			<item> until  </item>
			<item> while  </item>
		</list>

		<list name="builtinfuncs">
			<item> XActive  </item>
			<item> XAttrib  </item>
			<item> XBg  </item>
			<item> XBind  </item>
			<item> XClearArea  </item>
			<item> XClip  </item>
			<item> XColor  </item>
			<item> XColorValue  </item>
			<item> XCopyArea  </item>
			<item> XDefault  </item>
			<item> XDrawArc  </item>
			<item> XDrawCurve  </item>
			<item> XDrawLine  </item>
			<item> XDrawRectangle  </item>
			<item> XDrawSegment  </item>
			<item> XDrawString  </item>
			<item> XEraseArea  </item>
			<item> XEvent  </item>
			<item> XFg  </item>
			<item> XFillArc  </item>
			<item> XFillPolygon  </item>
			<item> XFillRectangle  </item>
			<item> XFlush  </item>
			<item> XFont  </item>
			<item> XFreeColor  </item>
			<item> XGotoRC  </item>
			<item> XGotoXY  </item>
			<item> XLower  </item>
			<item> XNewColor  </item>
			<item> XPattern  </item>
			<item> XPending  </item>
			<item> XPixel  </item>
			<item> XQueryPointer  </item>
			<item> XRaise  </item>
			<item> XReadImage  </item>
			<item> XSync  </item>
			<item> XTextWidth  </item>
			<item> XUnbind  </item>
			<item> XWriteImage  </item>
			<item> XdrawPoint  </item>
			<item> asin  </item>
			<item> atan  </item>
			<item> bal  </item>
			<item> callout  </item>
			<item> center  </item>
			<item> char  </item>
			<item> chdir  </item>
			<item> collect  </item>
			<item> copy  </item>
			<item> cos  </item>
			<item> cset  </item>
			<item> delay  </item>
			<item> delete  </item>
			<item> detab  </item>
			<item> display  </item>
			<item> entab  </item>
			<item> errorclear  </item>
			<item> exit  </item>
			<item> exp  </item>
			<item> find  </item>
			<item> flush  </item>
			<item> function  </item>
			<item> get  </item>
			<item> getch  </item>
			<item> getche  </item>
			<item> getenve  </item>
			<item> iand  </item>
			<item> icom  </item>
			<item> image  </item>
			<item> insert  </item>
			<item> integer  </item>
			<item> ior  </item>
			<item> ishift  </item>
			<item> ixor  </item>
			<item> kbhit  </item>
			<item> key  </item>
			<item> left  </item>
			<item> list  </item>
			<item> log  </item>
			<item> many  </item>
			<item> map  </item>
			<item> match  </item>
			<item> member  </item>
			<item> mmout  </item>
			<item> mmpause  </item>
			<item> mmshow  </item>
			<item> move  </item>
			<item> name  </item>
			<item> numeric  </item>
			<item> open  </item>
			<item> ord  </item>
			<item> pop  </item>
			<item> pos  </item>
			<item> proc  </item>
			<item> pull  </item>
			<item> push  </item>
			<item> push  </item>
			<item> put  </item>
			<item> read  </item>
			<item> reads  </item>
			<item> real  </item>
			<item> remove  </item>
			<item> rename  </item>
			<item> repl  </item>
			<item> reverse  </item>
			<item> right  </item>
			<item> rtod  </item>
			<item> runerr  </item>
			<item> save  </item>
			<item> seek  </item>
			<item> seq  </item>
			<item> set  </item>
			<item> sin  </item>
			<item> sort  </item>
			<item> sortf  </item>
			<item> sqrt  </item>
			<item> stop  </item>
			<item> string  </item>
			<item> system  </item>
			<item> tab  </item>
			<item> table  </item>
			<item> tan  </item>
			<item> trim  </item>
			<item> type  </item>
			<item> variable  </item>
			<item> where  </item>
			<item> write  </item>
			<item> writes  </item>

		</list>

		<list name="specialvars">
			<item> &amp;  </item>
			<item> &amp;allocated  </item>
			<item> &amp;ascii  </item>
			<item> &amp;clock  </item>
			<item> &amp;col  </item>
			<item> &amp;collections  </item>
			<item> &amp;control  </item>
			<item> &amp;cset  </item>
			<item> &amp;current  </item>
			<item> &amp;date  </item>
			<item> &amp;dateline  </item>
			<item> &amp;digits  </item>
			<item> &amp;e  </item>
			<item> &amp;error  </item>
			<item> &amp;errornumber  </item>
			<item> &amp;errortext  </item>
			<item> &amp;errorvalue  </item>
			<item> &amp;errout  </item>
			<item> &amp;fail  </item>
			<item> &amp;features  </item>
			<item> &amp;file  </item>
			<item> &amp;host  </item>
			<item> &amp;input  </item>
			<item> &amp;interval  </item>
			<item> &amp;lcase  </item>
			<item> &amp;ldrag  </item>
			<item> &amp;letters  </item>
			<item> &amp;level  </item>
			<item> &amp;line  </item>
			<item> &amp;lpress  </item>
			<item> &amp;lrelease  </item>
			<item> &amp;main  </item>
			<item> &amp;mdrag  </item>
			<item> &amp;meta  </item>
			<item> &amp;mpress  </item>
			<item> &amp;mrelease  </item>
			<item> &amp;null  </item>
			<item> &amp;output  </item>
			<item> &amp;phi  </item>
			<item> &amp;pi  </item>
			<item> &amp;pos  </item>
			<item> &amp;progname  </item>
			<item> &amp;random  </item>
			<item> &amp;rdrag  </item>
			<item> &amp;regions  </item>
			<item> &amp;resize  </item>
			<item> &amp;row  </item>
			<item> &amp;rpress  </item>
			<item> &amp;rrelease  </item>
			<item> &amp;shift  </item>
			<item> &amp;source  </item>
			<item> &amp;storage  </item>
			<item> &amp;subject  </item>
			<item> &amp;time  </item>
			<item> &amp;trace  </item>
			<item> &amp;ucase  </item>
			<item> &amp;version  </item>
			<item> &amp;window  </item>
			<item> &amp;x  </item>
			<item> &amp;y  </item>
		</list>

		<contexts>
			<context name="Normal" attribute="Normal Text" lineEndContext="#stay">
				<keyword attribute="Preprocessor" String="prep" context="#stay"/>
				<keyword attribute="Keyword" String="statements" context="#stay"/>
				<keyword attribute="Builtin Function" String="builtinfuncs" 
context="#stay"/>
				<keyword attribute="Special Variable" String="specialvars" 
context="#stay"/>
				<RegExpr attribute="Normal" String="[a-zA-Z_][a-zA-Z_0-9]+" 
context="#stay"/>
				<RegExpr attribute="Long" String="[1-9][0-9]*([eE][0-9.]+)?[Ll]" 
context="#stay"/>
				<RegExpr attribute="Hex" String="[0-9a-fA-F]+[rR]0*16]" context="#stay"/>
				<RegExpr attribute="Octal" String="[0-7]+[rR]0*8]" context="#stay"/>
				<RegExpr attribute="Float" 
String="([1-9][0-9]*)?\.[0-9]*([eE][1-9][0-9]*(\.[0-9]*)?)?" 
context="#stay"/>

				<RegExpr attribute="Int" String="[0-9]+" context="#stay"/>

				<RegExpr attribute="Comment" String="#.*$" context="#stay"/>

				<DetectChar attribute="String" char="'" context="Single A-string"/>
				<DetectChar attribute="String" char="&quot;" context="Single Q-string"/>

				<RegExpr attribute="Operator" 
String="[+*/\(\)%\|\[\]\{\}:=;\!&lt;&gt;!^&amp;~-]" context="#stay"/>

			</context>

			<context name="Single A-string" attribute="String" lineEndContext="#stay">
				<HlCStringChar attribute="String" context="#stay"/>
				<DetectChar attribute="String" char="'" context="#pop"/>
			</context>

			<context name="Single Q-string" attribute="String" lineEndContext="#stay">
				<HlCStringChar attribute="String" context="#stay"/>
				<DetectChar attribute="String" char="&quot;" context="#pop"/>
			</context>

		</contexts>
		<itemDatas>
			<itemData name="Normal Text" defStyleNum="dsNormal"/>
			<itemData name="Operator" defStyleNum="dsChar"/>
			<itemData name="Keyword" defStyleNum="dsKeyword"/>
			<itemData name="Builtin Function" defStyleNum="dsDataType"/>
			<itemData name="Special Variable" defStyleNum="dsOthers"/>
			<itemData name="Preprocessor" defStyleNum="dsChar"/>
			<itemData name="Float" defStyleNum="dsFloat"/>
			<itemData name="Int" defStyleNum="dsDecVal"/>
			<itemData name="Hex" defStyleNum="dsOthers"/>
			<itemData name="Octal" defStyleNum="dsOthers"/>
			<itemData name="Comment" defStyleNum="dsComment"/>
			<itemData name="String" defStyleNum="dsString"/>
		</itemDatas>
	</highlighting>
   <general>
     <comments>
       <comment name="singleLine" start="#" />
     </comments>
     <keywords casesensitive="1" />
   </general>
</language>

___________________________________________________
.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.

[Index of Archives]     [Trinity (TDE) Desktop Users]     [Fedora KDE]     [Fedora Desktop]     [Linux Kernel]     [Gimp]     [GIMP for Windows]     [Gnome]     [Yosemite Hiking]
  Powered by Linux