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

Steve King sking at arbor.net
Thu Oct 16 18:17:35 UTC 2008

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.

If the right paren was added by automatic pair matching, you should just
be able to type a right paren to skip over it. Otherwise, how about
recording a macro to move one character to the right (using the cursor
keys, of course) and assigning it to a key of your choice? Or creating a
snippet that you can tab through?

You could possibly get more creative by writing a command bound to the
period key, examining $TM_CURRENT_LINE and $TM_COLUMN_NUMBER to take
different actions depending on whether or not the next character is a
right paren.

Steve King
Sr. Software Engineer
Arbor Networks
+1 734 821 1461
www.arbornetworks.com <http://www.arbornetworks.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20081016/39a6d224/attachment.html>

More information about the textmate mailing list