I want to write a trigger that highlights everything between quotation marks. Right now I have a trigger set to fire on "*", but it only highlights the quotation marks themselves. I want the trigger to highlight everything in between, too.
How do I do that?
Can you show us the trigger please:
http://mushclient.com/copying
<triggers>
<trigger
custom_colour="2"
enabled="y"
group="Highlighted Words"
ignore_case="y"
keep_evaluating="y"
match="\"*\""
regexp="y"
repeat="y"
sequence="90"
other_text_colour="silver"
>
</trigger>
</triggers>
Change it to:
<triggers>
<trigger
custom_colour="2"
enabled="y"
group="Highlighted Words"
ignore_case="y"
keep_evaluating="y"
match="\".*\""
regexp="y"
repeat="y"
sequence="90"
other_text_colour="silver"
>
</trigger>
</triggers>
You need a dot before the *, because .* means "any number of anything".
You might also want to change from:
to:
The question mark makes the match "less greedy" which will make a difference if you have two lots of quoted things in a single line.