Reply to topic

How to create a Kate highlight syntax to CSV files

mvp83
Registered Member
Posts
1
Karma
0
Hi guys,

I'm working with CSV files and I'm using vim because of the rainbow csv plugin that makes the editing easier:

http://www.vim.org/scripts/script.php?script_id=4598

But I prefer use Kate and as I did not found anything on the Internet like it, so I'm trying to do a syntax highlight myself, but I'm not too familiar with the file format and do not know if it is possible to do something similar to rainbow csv on Kate.
I was trying to do an itemData for each word position, but did not work like I was expecting.

<context attribute="Normal" lineEndContext="#stay" name="normal">
<RegExpr attribute="Comment" context="#stay" String="^\s*#.*$" />
<RegExpr attribute="Comma0" context="#stay" String="^.*," minimal="true" />
<RegExpr attribute="Comma1" context="#stay" String=",.*," minimal="true" />
</context>
<itemDatas>
<itemData name="Comma0" defStyleNum="dsComma0" color="#02BCFF" />
<itemData name="Comma1" defStyleNum="dsComma1" color="#81FF4B" />
<itemData name="Comma2" defStyleNum="dsComma2" color="#FF4848" />
<itemData name="Comment" defStyleNum="dsComment"/>
<itemData name="Normal" defStyleNum="dsNormal"/>
</itemDatas>

I wanted that each word would have a different color.

Text example:

word0,word1,word2,word3,word4,...,wordN

If anyone could help me, I would aprecciate.
EwingKang
Registered Member
Posts
1
Karma
0
Just registered for this post to follow it.
Love the Kate editor, would also like to see this functionality implemented.

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], gogor, Google [Bot], Sogou [Bot]