On Tuesday, November 19, 2013 1:25:48 PM UTC-6, Daniel "paradigm" Thau wrote:
> I noticed a common pattern when using Vim:
> - I want to operate on a text object that is not under/around the cursor
> - The cursor is not over/in a text object of this type.
> 
> For example, with the cursor on the "x" and a desire to operate on the 
> conditional part of the if-statement:
> 
>     x = 1;
>     ...
>     if (...) {
>         ...
>     }
> 
> In these situations I have been moving the cursor to the object then 
> selecting the object with something like "/(<cr>vi(" or "5jf(vi(".
> 
> However, in that situation the text-object commands don't do anything. 

No, in this situation the text object certainly CAN do something, because these 
text objects can be nested!

Consider the [ai][{B] text object you mention. Chances are, you're inside a 
function when your cursor is on the "x=1" line. So pressing va{ should select 
the entire function body. It should not select the next block after the cursor.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui