如何使用XML在gedit中定义大括号,分号等的颜色

时间:2016-06-06 12:28:03

标签: xml gedit

之前我从未使用XML,如何define color使用curly-bracesemi-colon等。

我复制了Tango xml并尝试了各种各样的东西;

<color name="red"                   value="#FF0000"/>

<style name="brace"               foreground="red" bold="true"/>
<style name="def:{"               foreground="red" bold="true"/>
<style name="def:'{'"             foreground="red" bold="true"/>

它不起作用。

感谢您的帮助!

2 个答案:

答案 0 :(得分:2)

I'm not sure to really understand what your need is here, but I'll say that XML is a markup language, you are not supposed to put style information in it. Xml is about describing the data you are working on.

If you want to use colors and such, associate your XML file to a CSS stylesheet for example, or produce an HTML output using XSL stylesheets.

答案 1 :(得分:0)

我知道这是旧的,但下面的链接有很多关于如何在gedit XML样式文件中设置各种颜色样式的例子,虽然我不确定哪一个适用于花括号和分号;可能是def:special-chardef:builtindef:keyword

gedit-themes