Created
June 16, 2015 13:25
-
-
Save fpersson/40d90be02a0dfdbeb1e2 to your computer and use it in GitHub Desktop.
Syntaxhighligting for android logfile, save the xml to ~/.kde/share/apps/katepart/syntax/android-log.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE language SYSTEM "language.dtd"> | |
<!-- | |
This file is part of KDE's kate project. | |
copyright : (C) 2015 by Fredrik Persson | |
email : [email protected] | |
This file is free software; you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation; either version 2 of the License, or | |
(at your option) any later version. | |
--> | |
<!-- | |
You'll find the "Writing a Kate Highlighting XML File HOWTO" at | |
http://kate.kde.org/doc/hlhowto.php | |
This is a template for the XML format used for syntax highlight descriptions | |
for the Kate text editor (http://kate.kde.org), which is part of the KDE | |
desktop environment (http://www.kde.org). | |
Use it as the base for your own syntax files. | |
Look at language.dtd for some documentation of the allowed elements and their attributes. | |
There is also a description of how to validate your syntax file. | |
You'll find the "Writing a Kate Highlighting XML File HOWTO" at | |
http://kate.kde.org/doc/hlhowto.php | |
--> | |
<language version="1.00" kateversion="2.4" name="Android Log" section="Other" extensions="*.log" mimetype="mimetypes" author="Fredrik Persson" licence="GPL"> | |
<highlighting> | |
<contexts> | |
<context attribute="Normal Text" lineEndContext="#pop" name="Normal Text" > | |
<!-- 06-15 14:42:51.754 --> | |
<RegExpr attribute="Date" context="date" String="[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}" /> | |
<Detect2Chars attribute="Info" char="I" char1="/" context="info" /> | |
<Detect2Chars attribute="Debug" char="D" char1="/" context="debug" /> | |
<Detect2Chars attribute="Error" char="E" char1="/" context="error" /> | |
<Detect2Chars attribute="Warning" char="W" char1="/" context="warning" /> | |
</context> | |
<context name="date" attribute="Date" lineEndContext="#pop"> | |
<DetectChar attribute="Date" context="#pop" char=" " lookAhead="true" /> | |
</context> | |
<context attribute="Info" lineEndContext="#pop" name="info" /> | |
<context attribute="Debug" lineEndContext="#pop" name="debug" /> | |
<context attribute="Error" lineEndContext="#pop" name="error" /> | |
<context attribute="Warning" lineEndContext="#pop" name="warning" /> | |
</contexts> | |
<itemDatas> | |
<itemData name="Normal Text" defStyleNum="dsNormal" /> | |
<itemData name="Keyword" defStyleNum="dsKeyword" /> | |
<itemData name="String" defStyleNum="dsString" /> | |
<itemData name="Info" defStyleNum="dsNormal" color="#23a45b" /> | |
<itemData name="Debug" defStyleNum="dsNormal" color="#0057AE" /> | |
<itemData name="Error" defStyleNum="dsNormal" color="#BF0303" /> | |
<itemData name="Warning" defStyleNum="dsNormal" color="#FF8000" /> | |
<itemData name="Date" defStyleNum="dsNormal" color="#C3C3C3" /> | |
</itemDatas> | |
</highlighting> | |
<general> | |
<keywords casesensitive="1" /> | |
</general> | |
</language> | |
<!-- kate: space-indent on; indent-width 2; replace-tabs on; indent-mode xml; --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment