If I write the following snippet:
${3:x}${1:$TM_SELECTED_TEXT}$3$2
activate it, then press tab twice so the first 'x' is selected, I would expect what I type to be mirrored in the other 'x' too. Why isn't it?
Similarly,
${1:x}${2:y}$1$2
doesn't do what I'd expect: the 'x' is mirrored, but the 'y' is not.
What am I missing?
Thanks, Robin
On 19. Mar 2007, at 18:28, Robin Houston wrote:
If I write the following snippet:
${3:x}${1:$TM_SELECTED_TEXT}$3$2
activate it, then press tab twice so the first 'x' is selected, I would expect what I type to be mirrored in the other 'x' too. Why isn't it?
The last tab stop acts as a termination point. So change it to:
${3:x}${1:$TM_SELECTED_TEXT}$3$2$0
Here we have added $0 as an explicit termination point (we could also have used $4, but $0 is better for the “semantic effect”).
On 3/19/07, Allan Odgaard throw-away-1@macromates.com wrote:
The last tab stop acts as a termination point.
Thanks for clearing this up, Allan. I've got it now!
Robin