[TxMt] R request: tab moves through list when cursor in collection
    Hans-Joerg Bibiko 
    bibiko at eva.mpg.de
       
    Tue Apr 24 07:36:50 UTC 2007
    
    
  
On 23.04.2007, at 16:33, Timothy Bates wrote:
> I often want to edit collections (R lists), and it would be nice if  
> tabbing
> inside a collection had the action of moving the selection to the  
> next item
> in the list.
> Would it be possible to write a command (to hard for a snippet, I  
> think)
> which takes over the tab key when there is no snippet bound to it, and
> detects if the user is in a c(x,y,..) structure, and selects the  
> next item
> in the list?
>
> So if the cursor is in item 1 like this
>
>> a = c(1|11,222)
>
> Then hitting tab would move to highlight all of item 2. Preferably  
> hitting
> shift-tab would move to the next previous item, or in front of the
> collection if already at the head.
An other way would be simply to use TM's Find Function. Look for  
regexp [0-9A-z]+. Use the APPLE+G for jumping forwards, and SHIFT 
+APPLE+G for jumping backwards (this only works partly; sometimes you  
have to press SHIFT+APPLE+G several times).
With that regexp you can create your own macros easily.
Cheers,
Hans
    
    
More information about the textmate
mailing list