Cursor motions cursor-motions navigation
These commands move the cursor position. If the new position is off of the
screen, the screen is scrolled to show the cursor (see also 'scrolljump' and
'scrolloff' options).
1. Motions and operators operator
2. Left-right motions left-right-motions
3. Up-down motions up-down-motions
4. Word motions word-motions
5. Text object motions object-motions
6. Text object selection object-select
7. Marks mark-motions
8. Jumps jump-motions
9. Various motions various-motions
Text object motions seem to be the most likely candidate (or would Jumps?). Move to object-motions and press <c-]> (Ctrl]):
If you aren't firing vim or sed for some other use, cat actually has an easy builtin way to collapse multiple blank lines, just use cat -s.
If you were already in vim and wanted to stay there, you could do this with the internal search and replace by issuing: :%s!\n\n\n\+!^M^M!g (The ^M is the visual representation of a newline, you can enter it by hitting Ctrl+vEnter), or save yourself the typing by just shelling out to cat: :%!cat -s.
Best Answer
Going to the help on navigation (
:h navigation
):Text object motions
seem to be the most likely candidate (or wouldJumps
?). Move toobject-motions
and press<c-]>
(Ctrl ]):Bingo!