Hi,
there’s something I really don’t understand about snippets.
Suppose I wanted to write one that writes a Python’s class attribute like this :
self.attribute = attribute
So, I wrote my snippet :
<snippet>
<content><![CDATA[self.${1:property} = $1]]></content>
</snippet>
Now, when I run it, all is fine but once I write “whatever”
like this (| is the cursor pos) :
self.whatever| = whatever
and I hit the tab key, I’ve got this :
self.whatever | = whatever
I expected :
self.whatever = whatever|
So how could I set the cursor pos at the end of the snippet ?
I’ve also tried
<snippet>
<content><![CDATA[self.${1:property} = $1$0]]></content>
</snippet>
because it was TextMate behaviour, but it fails.
Thanks for any hint.