[TxMt] Informative text for snippets

Édouard Gilbert edouard.gilbert at eleves.bretagne.ens-cachan.fr
Tue Aug 7 16:10:46 UTC 2007


Hi everyone,

I'm wondering if there was a mean to insert some kind of “informative  
text” in a snippet, i.e. text that informs you of what should be  
inserted where but disappears when it's not needed any longer.

Here's a short example (a method definition in some Lisp dialect) of  
a problem I currently face that should make the situation a bit clearer.

Here is what I'd want to appear with my defmethod snippet, with  
“normal” default text between [ ] and informative text between { } :

(defmethod [name] ({parameters}) ({code}))

The parameters are written as “(name type)”, so when I reach the  
{parameters}, the first thing I do is adding a parenthesis. Result:  
the default text (“parameters”) is still there, but now unselected  
and between parenthesis. I thus have to remove it by hand, which is  
quite annoying. Of course, a possibility is to let the default string  
empty, but you can easily get lost in your structure, then  
(especially in Lisp). So is there a way to have text reminding you  
what you should be typing, but disappearing after a while (ideally,  
when you hit tab in order to jump to the next snippet point or when  
you reach $0)?

Thank you very much,
Édouard



More information about the textmate mailing list