[TxMt] I must be missing something obvious

Juan Falgueras jfalgueras at uma.es
Sat Apr 14 18:29:50 UTC 2007

>>> blah['name|']
>>> So, now what do I do???
> I think a nice new feature here would be to allow the null-action  
> of "tab"
> to be to jump over any auto-created paired-chars. Then we could  
> just tab out
> of the nest and carry on. It must be very seldom that users want a  
> real tab
> character inside paired-characters.

I have disabled Auto Pairing in preferences and have defined several  
commands like the next one for () pair.  I feel it more intuitive and  
coherent:  you have a kind of snipped only when you are writing under  
the assumption you are are inside pairs but you must ask for it apart  
the usual ( character that is yet there.  _For me_ is very stupid to  
need to delete the ) char so frequently because you usually are re- 
touching code, not writing it down like a literary work...

#!/usr/bin/env ruby
   print '($1)$0'
   $s = ENV['TM_SELECTED_TEXT'].to_s.gsub(/(?=[$`\\])/, '\\')
   print "(#{$s})$0"

--- Command (Opt-Cmd-8, from old Mathematica), Use Selected text of  
nothing, insert as a snipped

Then when you want a single (, use (..   and when you want a (|)|   
use the command.

More information about the textmate mailing list