[TxMt] Re: Moving caret outside parentheses without using cursor keys

Hans-Jörg Bibiko bibiko at eva.mpg.de
Thu Oct 16 18:56:46 UTC 2008


On 16.10.2008, at 20:17, Steve King wrote:

> Alex Rudyk wrote:
>>
>> Hi Often I am typing for example instanse.method_a(:param =>  
>> "value"_) with _ I marked where the caret is placed. So the  
>> question is: is there any way to move caret from the position on  
>> the example to the position right after right parentheses without  
>> moving my fingers to cursor keys. So I want to be able then  
>> type .method_b on the same line as fast as possible. This case is  
>> also applicable for single and double quotes.
>

Or record a macro:

Find:
(?<=[\]"'\)])(?=\s|$)

Regular expr: true
ignore case: false
Wrap around: true

- press Next

- save this macro, bind it to what ever.

This works for () [] {} "" '' and the caret could be in any position  
inside these pairs. This also works for something like:

(Hel|lo
world)


| := caret

Cheers,

--Hans



More information about the textmate mailing list