This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Kate syntax highlighting not changing when editing syntax

Tags: None
(comma "," separated)
geitenkaez
Registered Member
Posts
2
Karma
0
Okay, so I have a problem with the kate default scheme syntax highlighting. Basically, what kate does is it makes
Code: Select all
#! ... !#
block comments. Which is not part of any standard, R6RS defines
Code: Select all
#| ... |#
as block comments but apparently something guile supports. Which wouldn't be a drastic problem if a shebang didn't turn the entire document into a block comment or that
Code: Select all
#!r6rs
is the way to start a document indicating its advertised conformance to R6RS as well as telling the implementation to use R6RS mode. (long explanation meant to motivate people to change this default behaviour, I don't think it's a good idea)

So
Code: Select all
$ kde4-config --prefix
gives me
Code: Select all
/usr
and lo and behold, the syntax files are at
Code: Select all
/usr/share/kde4/apps/katepart/syntax
. And lo and behold, scheme.xml contains:

Code: Select all
    <comments>
      <comment name="singleLine" start=";;" />
      <comment name="multiLine" start="#!" end="!#" />
    </comments>


or at least it did, I changed it appropriately. Saved it, restarted Kate, nothing happens? Is there some command I need to give kate to reload its syntax definitions that I'm unaware of?
geitenkaez
Registered Member
Posts
2
Karma
0
Right, found the answer, in case anyone latyer googles and finds this, in the scheme.xml file there is this part:

Code: Select all
          <Detect2Chars attribute="Comment" context="MultiLineComment" char="#" char1="!" beginRegion="region"/>


and this part

Code: Select all
      <context name="MultiLineComment" attribute="Comment" lineEndContext="#stay">
        <RegExpr attribute="Comment" context="#pop" String="!#\s*$" endRegion="region" column="0"/>
      </context>


Because it's rexed light that makes it hard to search it, removing them solves it.

Because it's regexed with !#
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
You probably want to file a bug at bugs.kde.org regarding this, to ensure the developers are aware of the issue.
Thanks for posting the solution here.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Evergrowing, Google [Bot], rblackwell