0

I want to exchange point and mark in a selection of text using vanilla Vim.

Consider a code block with some comments immediately preceding the block. Suppose I want to operate only on the code block. I can select the paragraph with vip. Doing this, however, places the cursor at the bottom of the paragraph. Were I able to exchange where the cursor is with where the selection starts, I could then move down.

<code>vip</code> <code>C-x C-x</code> <code>jj</code>

Since I am an Evil user, I can just do vip C-x C-x o jj, where the middle sequence is exchange-point-and-mark. How do I do it without Emacs?

Lorem Ipsum
  • 4,020
  • 4
  • 41
  • 67

1 Answers1

7

This is command o in visual mode, aka v_o.

Hauleth
  • 22,873
  • 4
  • 61
  • 112