Sunday, November 25, 2012

Re: vim: is there a way to C-V a text object?

FYI finally I defined a new map like this:

nn ,v {+vip<c-v>$

and it works well.


On 11/20/2012 07:32 AM, ping wrote:
On 11/20/2012 2:28 AM, Christian Brabandt wrote:
On Mon, November 19, 2012 23:03, ping wrote:  
looks currently "C-v i/a p" is same as "v i/a p" for a paragraph...  
I don't understand. Can you please explain, what you are trying to do?  I am not sure <Ctrl-V> and paragraph actually makes sense here.    regards,  Christian    
it makes sense, at least for me, in the case that I want to paste a new column.

say I have my text like this:

    interfac
     qos-pro
     encapsu
     ip desc
     ip sa-v
     ip addr
     no ip r

    e seria
    file "I
    lation
    ription
    alidate
    ess 65.
    edirect

how do I move the 2nd paragraph and clue it to the 1st?

currently manually I can only copy it like this:

go to 2nd P and put my cursor exactly at left-up corner letter "e"
c-v and move down to left-bottom corner letter "e"
$
y

that said,  0vip<c-v>$ OR ^vip<c-v>$ , or using } only works if the text object happen to start from 1st column.
in case of indented Paragraph, there seems no way to change the highlighted columns (to make it start from 1st column e instead of all) once selected via "v a p".


=======================
and b.t.w, your NrrwRgn is nice!

No comments:

Post a Comment