之前我从未使用XML
,如何define
color
使用curly-brace
或semi-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"/>
它不起作用。
感谢您的帮助!
答案 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-char
,def:builtin
或def:keyword
: