[prev in list] [next in list] [prev in thread] [next in thread]
List: kwrite-devel
Subject: Syntax file for plain text files
From: Nicolas Girard <nicolas.girard () nerim ! net>
Date: 2006-10-04 14:42:46
Message-ID: 200610041642.48661.nicolas.girard () nerim ! net
[Download RAW message or body]
Dear people,
I'm quite often using kate to edit plain text files and I was missing folding
with them. I joined #kate and was adviced by a guy nicknamed "gigabytes" to
write a syntax file according to my needs.
Here's what I came to: a simple syntax file that just gets all indented lines
folded and treats # as the beginning of a comment.
You'll find the contents of my /usr/share/apps/katepart/syntax/text.xml file
below. Feel free to do whatever you want with it.
Also note that I'm currently not subscribed to this list, so I'd be glad to
join any discussion related to this if you CC me.
Cheers,
Nicolas Girard
=================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language>
<!-- Plain text syntax highlightning v0.01 by Nicolas Girard.
Based on the folding section of the python syntax file by Per Wigren -->
<language name="Text" version="0.01" kateversion="2.4" section="Other"
extensions="*.txt" mimetype="text/plain" casesensitive="1" author="Nicolas
Girard" license="">
<highlighting>
<contexts>
<context name="Normal" attribute="Normal Text"
lineEndContext="#stay">
<RegExpr attribute="Comment" String="#.*$" context="#stay"/>
</context>
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal"/>
<itemData name="Comment" defStyleNum="dsComment"/>
</itemDatas>
</highlighting>
<general>
<folding indentationsensitive="1" />
<comments>
<comment name="singleLine" start="#" position="afterwhitespace"/>
</comments>
</general>
</language>
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic