modelines.xml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE language SYSTEM "language.dtd"
  3. [
  4. <!ENTITY space " ">
  5. <!ENTITY end "&#59;">
  6. ]>
  7. <!--
  8. Copyright (c) 2012-2014 by Alex Turbov (i.zaufi@gmail.com)
  9. -->
  10. <language name="Modelines"
  11. version="6"
  12. kateversion="5.0"
  13. section="Other"
  14. extensions=""
  15. mimetype=""
  16. author="Alex Turbov (i.zaufi@gmail.com)"
  17. license="MIT"
  18. hidden="true"
  19. priority="6">
  20. <!--
  21. The main purpose of this file is to be included into other syntax files.
  22. NOTE Default colors are set to 'Comment', so if u don't want to highight it,
  23. just leave colors as is...
  24. TODO Support for other modelines? emacs/vim??
  25. -->
  26. <highlighting>
  27. <list name="ModelineStartKeyword">
  28. <item>kate:</item>
  29. </list>
  30. <list name="Booleans">
  31. <item>auto-brackets</item>
  32. <!-- NOTE Deprecated -->
  33. <!-- <item>auto-insert-doxygen</item> -->
  34. <item>automatic-spell-checking</item> <!-- NOTE Since KDE 4.?? -->
  35. <item>backspace-indents</item>
  36. <item>block-selection</item>
  37. <item>bookmark-sorting</item>
  38. <item>bom</item>
  39. <item>byte-order-marker</item>
  40. <item>byte-order-mark</item>
  41. <item>dynamic-word-wrap</item>
  42. <item>folding-markers</item>
  43. <item>folding-preview</item> <!-- Since KTextEditor 5.24 -->
  44. <item>icon-border</item>
  45. <item>indent-pasted-text</item> <!-- Since KDE 4.11 -->
  46. <item>keep-extra-spaces</item>
  47. <item>line-numbers</item>
  48. <item>newline-at-eof</item> <!-- Since KDE 4.9 -->
  49. <item>overwrite-mode</item>
  50. <item>persistent-selection</item>
  51. <!-- NOTE Deprecated since KDE 4.10 -->
  52. <!-- <item>remove-trailing-space</item> -->
  53. <item>replace-tabs-save</item>
  54. <item>replace-tabs</item>
  55. <item>replace-trailing-space-save</item>
  56. <item>smart-home</item>
  57. <item>scrollbar-minimap</item> <!-- Since KTextEditor 5.24 -->
  58. <item>scrollbar-preview</item> <!-- Since KTextEditor 5.24 -->
  59. <item>space-indent</item>
  60. <item>show-tabs</item>
  61. <item>show-trailing-spaces</item> <!-- NOTE Since KDE 4.?? -->
  62. <item>tab-indents</item>
  63. <item>word-wrap</item>
  64. <item>wrap-cursor</item>
  65. </list>
  66. <list name="True">
  67. <item>on</item>
  68. <item>true</item>
  69. <item>1</item>
  70. </list>
  71. <list name="False">
  72. <item>off</item>
  73. <item>false</item>
  74. <item>0</item>
  75. </list>
  76. <list name="Integrals">
  77. <item>auto-center-lines</item>
  78. <item>font-size</item>
  79. <item>indent-mode</item>
  80. <item>indent-width</item>
  81. <item>tab-width</item>
  82. <item>undo-steps</item>
  83. <item>word-wrap-column</item>
  84. </list>
  85. <list name="Strings">
  86. <item>background-color</item>
  87. <item>bracket-highlight-color</item>
  88. <item>current-line-color</item>
  89. <item>default-dictionary</item>
  90. <item>encoding</item> <!-- NOTE Since KDE 4.?? -->
  91. <item>eol</item> <!-- Valid settings are unix, mac and dos -->
  92. <item>end-of-line</item> <!-- Valid settings are unix, mac and dos -->
  93. <item>font</item>
  94. <item>hl</item>
  95. <item>icon-bar-color</item>
  96. <item>mode</item> <!-- NOTE Since KDE 4.?? -->
  97. <item>scheme</item>
  98. <item>selection-color</item>
  99. <item>syntax</item>
  100. <item>word-wrap-marker-color</item>
  101. </list>
  102. <list name="RemoveSpaces">
  103. <item>remove-trailing-spaces</item>
  104. </list>
  105. <list name="RemoveSpacesOptions">
  106. <item>0</item>
  107. <item>-</item>
  108. <item>none</item>
  109. <item>modified</item>
  110. <item>mod</item>
  111. <item>+</item>
  112. <item>1</item>
  113. <item>all</item>
  114. <item>*</item>
  115. <item>2</item>
  116. </list>
  117. <contexts>
  118. <context name="Normal" attribute="Comment" lineEndContext="#stay">
  119. <keyword String="ModelineStartKeyword" context="Modeline" attribute="Keyword" />
  120. <RegExpr String="\bkate-(?:mimetype|wildcard)\(.*\):" context="Modeline" attribute="Keyword" />
  121. </context>
  122. <context name="Modeline" attribute="Comment" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
  123. <DetectSpaces />
  124. <keyword String="Booleans" context="Booleans" attribute="Variable" />
  125. <keyword String="Integrals" context="Integrals" attribute="Variable" />
  126. <keyword String="Strings" context="Strings" attribute="Variable" />
  127. <keyword String="RemoveSpaces" context="RemoveSpaces" attribute="Variable" />
  128. </context>
  129. <context name="Booleans" attribute="Comment" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
  130. <DetectSpaces />
  131. <keyword String="True" attribute="Option ON" context="#stay" />
  132. <keyword String="False" attribute="Option OFF" context="#stay" />
  133. <DetectChar char="&end;" context="#pop" attribute="Variable" />
  134. </context>
  135. <context name="Integrals" attribute="Comment" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
  136. <DetectSpaces />
  137. <Int attribute="Number" context="#stay" />
  138. <DetectChar char="&end;" context="#pop" attribute="Variable" />
  139. </context>
  140. <context name="Strings" attribute="String" lineEndContext="#pop">
  141. <DetectSpaces />
  142. <RegExpr String="[^&end;&space;]" context="#stay" />
  143. <DetectChar char="&end;" context="#pop" attribute="Variable" />
  144. </context>
  145. <context name="RemoveSpaces" attribute="Comment" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
  146. <DetectSpaces />
  147. <keyword String="RemoveSpacesOptions" attribute="Value" context="#pop!RemoveSpacesEnd" />
  148. <DetectChar char="&end;" context="#pop" attribute="Variable" />
  149. </context>
  150. <context name="RemoveSpacesEnd" attribute="Comment" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
  151. <DetectChar char="&end;" context="#pop" attribute="Variable" />
  152. </context>
  153. </contexts>
  154. <itemDatas>
  155. <itemData name="Comment" defStyleNum="dsComment" spellChecking="true" />
  156. <itemData name="Keyword" defStyleNum="dsAnnotation" spellChecking="false" />
  157. <itemData name="Variable" defStyleNum="dsCommentVar" spellChecking="false" />
  158. <itemData name="Number" defStyleNum="dsDecVal" spellChecking="false" />
  159. <itemData name="String" defStyleNum="dsString" spellChecking="false" />
  160. <itemData name="Value" defStyleNum="dsOthers" spellChecking="false" />
  161. <itemData name="Option ON" defStyleNum="dsOthers" spellChecking="false" />
  162. <itemData name="Option OFF" defStyleNum="dsOthers" spellChecking="false" />
  163. </itemDatas>
  164. </highlighting>
  165. <general>
  166. <keywords casesensitive="1" weakDeliminator=":-+*" />
  167. </general>
  168. </language>
  169. <!-- kate: indent-width 2; -->