Vim - 在段落之间导航(通过空行)

Vim - 在段落之间导航(通过空行)

VIM 中是否有内置命令可以导航到下一个/上一个空行?

答案1

下一个空行使用(右花括号):

}

先前的空行使用(左花括号):

{

在命令模式下输入以上内容

答案2

转到导航帮助(:h navigation):

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似乎是最有可能的候选人(或者会Jumps?)。移至object-motions并按<c-]>( Ctrl ]):

5. Text object motions                                  object-motions

                                                        (
(                       [count] sentences backward.  exclusive motion.

                                                        )
)                       [count] sentences forward.  exclusive motion.

                                                        {
{                       [count] paragraphs backward.  exclusive motion

                                                        }
}                       [count] paragraphs forward.  exclusive motion.

答对了!

相关内容