Closed NotroDev closed 2 years ago
This is probably what you want:
<?xml version="1.0"?>
<SyntaxDefinition name="Custom Highlighting" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
<Color name="Comment" foreground="Green" />
<Color name="String" foreground="Blue" />
<Color name="BracedExpression" foreground="Orange" />
<RuleSet>
<Span color="String" ruleSet="BracedExpressionRuleSet">
<Begin>"</Begin>
<End>"</End>
</Span>
<Import ruleSet="BracedExpressionRuleSet" />
</RuleSet>
<RuleSet name="BracedExpressionRuleSet">
<Span color="BracedExpression">
<Begin>{</Begin>
<End>}</End>
</Span>
</RuleSet>
</SyntaxDefinition>
This is probably what you want:
<?xml version="1.0"?> <SyntaxDefinition name="Custom Highlighting" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008"> <Color name="Comment" foreground="Green" /> <Color name="String" foreground="Blue" /> <Color name="BracedExpression" foreground="Orange" /> <RuleSet> <Span color="String" ruleSet="BracedExpressionRuleSet"> <Begin>"</Begin> <End>"</End> </Span> <Import ruleSet="BracedExpressionRuleSet" /> </RuleSet> <RuleSet name="BracedExpressionRuleSet"> <Span color="BracedExpression"> <Begin>{</Begin> <End>}</End> </Span> </RuleSet> </SyntaxDefinition>
Yes, it's working perfectly! Thanks! :D
Hey, sorry, but I have new problems... This:
<Keywords foreground="#FF5555">
<Word>&c</Word>
</Keywords>
Is working like this: Why? I want it to be always highlighted.
And... I have this:
<Span color="Command">
<Begin>command </Begin>
<End>:</End>
<RuleSet>
<!-- nested span for escape sequences -->
<Span begin="#"/>
</RuleSet>
</Span>
It's working okay in what i want: But... "command" is red also in the normal text:
And i have a question.
I have colors like this:
How can i make it to look like this? I hope you understand.
(Eg. &a is green, and all text after &a is green (until a new color appears, eg. &b)
(Sorry, i don't understand regex etc)
This is probably what you want:
<?xml version="1.0"?> <SyntaxDefinition name="Custom Highlighting" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008"> <Color name="Comment" foreground="Green" /> <Color name="String" foreground="Blue" /> <Color name="BracedExpression" foreground="Orange" /> <RuleSet> <Span color="String" ruleSet="BracedExpressionRuleSet"> <Begin>"</Begin> <End>"</End> </Span> <Import ruleSet="BracedExpressionRuleSet" /> </RuleSet> <RuleSet name="BracedExpressionRuleSet"> <Span color="BracedExpression"> <Begin>{</Begin> <End>}</End> </Span> </RuleSet> </SyntaxDefinition>
To my last reply. I can use this code:
<Span foreground="#FF5555">
<Begin>&c</Begin>
<End>&</End>
</Span>
But it colors next & too. I just need to remove it and it will be great...
Hi. I have this in my xaml for code highlighting:
And yeah, it's working. But, i want to add a rule that will override it. Eg. i have a rule that highlights text between
{}
. And i want it to highlight in""
too. Like this:How can i do this?