[TxMt] Re: Customizing Syntax-Highlighting
Allan Odgaard
mailinglist at textmate.org
Thu Apr 3 07:03:54 UTC 2014
On 3 Apr 2014, at 13:45, Ingo Lantschner wrote:
> […] But it has some side-effects: E.g. the change from double-quotes
> to single-quotes by pressing `Ctrl+Shift+"` does not work any more.
> Plus I would like to change the formatting (color, ...) to something
> different.
>
> What would be the the best way?
To make toggling quotes work, add proper scope to the string part, e.g.:
{ patterns = (
{ name = 'comment.line.debug.perl';
match = '\bi ((''.*'')|(".*")|(q{.*})|(qq{.*}));';
},
captures = {
2 = { name = 'string.quoted.single'; };
3 = { name = 'string.quoted.double'; };
4 = { name = 'string.quoted.other.q.perl'; };
5 = { name = 'string.quoted.other.qq.perl'; };
};
);
As for formatting, this would need to be added to the current theme (or
possibly as global settings).
Here you would target `comment.line.debug.perl` in the theme.
More information about the textmate
mailing list