Hi, would it be possible to change the definition
{ name = 'meta.escape-character.latex'; match = '\$';
into
{ name = 'meta.escape-character.latex'; match = '\$|(?<=\)\n';
The problem is that a backslash followed by a newline is not recognized by the first definition.
Piero
Piero,
Can you give an example of when/why this is important? Its a reasonable request, I just don't understand it.
Thanks,
Brad
Brad Miller <bmiller@...> writes:
Piero,Can you give an example of when/why
this is important? Its a reasonable request, I just don't understand it.Thanks,Brad-- Brad MillerAssistant Professor, Computer Science
Luther College
Ok, here is my answer: when I type ` or " (accents in tex) TextMate always inserts double accents, or worse, which I have to manually delete. This is a RPITA, which can be fully appreciated only when typing in Italian or French with a lot of accents. And this is not very elegant either.
Solution 1 (Allan's favorite): use UTF-8 and accented characters. Nice until you exchange your files with someone using windows or older systems or a system in a different language etc etc. When I send by e-mail a file to myself sometimes it's garbled... I do not like this and I would really prefer to use ', " etc if possible
Solution 2: define a snippet trggered by ` (backtick), which inserts a ` (sure, a backtick) and is tied to the scope meta.escape-character.latex The same for " (double quotes).
So you see this is a nice application of the scope "caret after a backslash", I do not know if there are others, but this one is certainly useful for me. I hope this makes my request more clear.
Thanks, Piero
Piero,
If I understand correctly you might try editing the Latex bundle preferences as per:
Section 15.4 Paired Characters http://www.macromates.com/textmate/manual/preferences_items#preferences_items
HTH
Peter
On 8/14/07, Piero D'Ancona pierodancona@gmail.com wrote:
Brad Miller <bmiller@...> writes:
Piero,Can you give an example of when/why
this is important? Its a reasonable request, I just don't understand it.Thanks,Brad-- Brad MillerAssistant Professor, Computer Science
Luther College
Ok, here is my answer: when I type ` or " (accents in tex) TextMate always inserts double accents, or worse, which I have to manually delete. This is a RPITA, which can be fully appreciated only when typing in Italian or French with a lot of accents. And this is not very elegant either.
Solution 1 (Allan's favorite): use UTF-8 and accented characters. Nice until you exchange your files with someone using windows or older systems or a system in a different language etc etc. When I send by e-mail a file to myself sometimes it's garbled... I do not like this and I would really prefer to use ', " etc if possible
Solution 2: define a snippet trggered by ` (backtick), which inserts a ` (sure, a backtick) and is tied to the scope meta.escape-character.latex The same for " (double quotes).
So you see this is a nice application of the scope "caret after a backslash", I do not know if there are others, but this one is certainly useful for me. I hope this makes my request more clear.
Thanks, Piero
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Peter Cowan <cowan.pd@...> writes:
Piero,
If I understand correctly you might try editing the Latex bundle preferences as per:
Section 15.4 Paired Characters http://www.macromates.com/textmate/manual/preferences_items#preferences_items
HTH
Peter
But this would disable paired quotes. I do not want to disable `' and "" pairings. What I want is that if I press \ and then ` I get ` In any other situation it's perfectly fine to get paired quotes, and they are useful also when writing tex files
Piero
On Aug 14, 2007, at 5:40 PM, Piero D'Ancona wrote:
Peter Cowan <cowan.pd@...> writes:
Piero,
If I understand correctly you might try editing the Latex bundle preferences as per:
Section 15.4 Paired Characters <http://www.macromates.com/textmate/manual/ preferences_items#preferences_items>
HTH
Peter
But this would disable paired quotes. I do not want to disable `' and "" pairings. What I want is that if I press \ and then ` I get ` In any other situation it's perfectly fine to get paired quotes, and they are useful also when writing tex files
Ok now your request is a bit more clear. According to the TeXbook, <return> and <tab> are to be treated the same as <space>, so I will make them consistently have scope constant.character.escape.tex. Then I'll set a preference item disabling smart typing in that context (which seems reasonable).
Piero
Haris Skiadas Department of Mathematics and Computer Science Hanover College
Thanks, That makes perfect sense now. I was only thinking of scope for the purpose of syntax coloring, but I can see how this would work better for you.
Brad