3

When in visual block mode is there a way to cause to the cursor to switch to the end/beginning of the block?

For example, in Excel this functionality is performed by the "." key. If the person has a block of cells selecting, then pressing the period key will cycle the cursor to each corner of the block. This allows the user to extend the block in the direction wanted. For example, if the user wants to extend the selection downwards, the cursor is moved to the top corner and then the down arrow key is pressed. What is the equivalent motion in Vim?

6

Command o will get you to the "other" end of the Visual selection.

See :help v_o:

Go to Other end of highlighted text: The current cursor position becomes the start of the highlighted text and the cursor is moved to the other end of the highlighted text. The highlighted area remains the same.

When you're in Visual Block mode, there's also O which takes you to the other corner on the same line (since Visual Block mode selects a rectangle), which you can use together with o to move to any corner of the selection.

2

If you want to move to the beginning or end of a paragraph of text, you can use } and { respectively.

When in visual block mode, you can use { to move back to the beginning of the selection, but this deselects the text. The command to reselect the previous visual block gv can be used.

For reference, the vim manual entry.

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