[TxMt] Making prototypes $ easier to type

Daniel Harple dharple at generalconsumption.org
Sat Jul 15 15:22:24 UTC 2006


On Jul 15, 2006, at 10:25 AM, Andreas Wahlin wrote:

> yes, because of the $R, $V and other possible  $'s I thought that  
> one could have the backspace thingie, because I use the $ to get  
> elements at least 90% of the time. Of course, others may have it  
> different.
>
> What I was looking for was mainly a way to revert the last thing  
> done with backspace so to speak, like both parantheses disappear  
> when you just delete one of them if you just added a pair. Perhaps  
> this is hard-coded behaviour?

You could give $("") a scope, meta.prototype.dollar-sign-empty or  
something (check the scope naming conventions), and bind a macro to  
“delete” given that scope that leaves just the “$”.

I think I hit a bug with the $ snippet parsing. I couldn't insert “$ 
("$1")$0”, but “ $("$1")$0” but worked.

Attached is the example, you should add detection of '' strings. The  
$ snippet should be changed to not work in strings.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestBundle.tmbundle.zip
Type: application/zip
Size: 2836 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20060715/92710c3b/attachment.zip>
-------------- next part --------------

-- Daniel



More information about the textmate mailing list