[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: problemms with syntax highlighting
From:       Simon =?iso-8859-1?q?H=FCrlimann?= <simon.huerlimann () access ! unizh ! ch>
Date:       2003-07-01 20:52:03
[Download RAW message or body]

Hi

> How can i change  syntax highlighting shame manually in text mode?
What do you mean by 'shame'? According to websters dictionary this means:
1 a : a painful emotion caused by consciousness of guilt, shortcoming, or 
impropriety 
  b : the susceptibility to such emotion
2 a : condition of humiliating disgrace or disrepute
3 a : something that brings censure or reproach; also : something to be 
regretted
  b : a cause of feeling shame 
:-)

> I need to create my own PHP shame but i can't do this via kate's
> properties..
Do you mean a color scheme? If you want to change the color or font-type used 
for keywords or strings... this should be realy doable using kates 
configuration dialog (is it that what you mean by kate's properties? ).

> /root/.kde/share/apps/katepart/syntax/php.xml
> and usr/share/apps/katepart/syntax/php.xml
> I editing this files and restart kde but syntax
> highlighting shame don't change.. 
Mmh, this should work...  You shouldn't need to modify 
/usr/share/apps/katepart/syntax/php.xml, this is provided by the kdelibs 
package. But you can add a php.xml to $HOME/.kde/share/apps/katepart/syntax, 
which will then be used instead.

> If i edit shame via kate's properties the xml files does not changing what i 
> do wrong or don't do?
The syntax file describes the syntax of the language, so kind of a markup can 
be done to the syntactic elements. The markup is the 'attribute' attribute, 
which selects a <itemData>, which is a description of how this 
word/sentence/block should be printed in kate. Look at the following part of 
php.xml:

	<itemData name="Keyword" defStyleNum="dsKeyword" />
	<itemData name="Function" defStyleNum="dsKeyword" color="#0000FF" 
selColor="#00ffff" bold="0" italic="0"/>

The first one says that all parts marked as 'Keyword' should be highlighted 
like you specified in kates configuration dialog highlighing section  
'Keyword' is defined. This is done by defStyleNum="dsKeyword". You can thus 
change the way keywords are highlighted by changing it in the configuration 
dialog. The XML file will stay untouched.

The second says that 'Function' parts should also be highlighted like 
dsKeyword, but is bold, italic uses color #00ffff... As here all properties 
of a highlighting are overwritten in the xml file, you can't change the way 
functions are highlighted beside editing the xml file.

You'll also find the "Writing a Kate Highlighting XML File HOWTO" at
http://kate.kde.org/doc/hlhowto.php

Regards
Simon

_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@mail.kde.org
http://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