[TxMt] Tab-stops work strangely with nested snippets?
Cocoa Bob
cocoabob at gmail.com
Fri Aug 10 18:00:54 UTC 2007
I want to produce
[origin [pt x]];
using a snippet called msg (short for message) that looks like this
[${1:Receiver} ${2:message}]
When I write msg and hit tab I am presented with
[Receiver message]
where Receiver is highlighted. I write origin and hit tab. Now I get
[origin message]
and message is highlighted.
I write msg again and hit tab.
To my surprise I get
[origin msg]
with tha caret after the last bracket .
So it seems that TM is giving priority to the outer snippet??? But I think
that two other alternatives might be better
Alternative 1: Forget all tab stops for the first snippet when an inner
snippet is activated.
Another alternative is
Alternative 2: When hitting tab give priority to the inner snippet first and
when it is finished then give focus to the outer snippet and let it do its
thing.
If I am wrong in my thinking tell me why. If I am right maybe it is some
programming difficulty with nested snippets that prevents the desired
behavior.
Thanks Bob
--
View this message in context: http://www.nabble.com/Tab-stops-work-strangely-with-nested-snippets--tf4250221.html#a12096203
Sent from the textmate users mailing list archive at Nabble.com.
More information about the textmate
mailing list