0

When a visual block is created, the block itself is highlighted, but the cursor is highlighted differently, green in my terminal.

If I want the block to stay the same but move just the location of the green cursor, how do I do that?

I want to do this so I can try to make a block edit at the beginning of a line. For example:

<C-v>4j$?2x

where the '?' is the motion I need to get the cursor back to the beginning of the block. If I do this without moving the cursor, then the whole block gets deleted, instead of just the first 2 characters in the block.

5

You are looking for the o visual command which will go to the other end of the visually selected text. There is also O which moves within the same line.

For more help see:

:h v_o
  • 1
    Wow. I use v_o often, but I never knew about v_O. Thanks! :D – Karl Yngve Lervåg Aug 11 '17 at 7:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.