“查找下一个"在 Vim 中 [英] "Find next" in Vim
本文介绍了“查找下一个"在 Vim 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
要在 Vim 中向前搜索 cake
,我会输入 /cake
,但是当我按回车键时,光标会跳转到第一个匹配项.是否有类似于查找下一个"的 Vim 命令?
To search forward in Vim for cake
, I'd type /cake
, but the cursor jumps to the first match when I press return. Is there a Vim command analogous to "find next"?
推荐答案
下一个是n,上一个是N.
如果您使用带有 ?
(例如,?cake
)而不是 /
的反向搜索,则情况正好相反.
And if you use reverse search with ?
(for example, ?cake
) instead of /
, it is the other way round.
如果它安装在您的系统上,您应该尝试从终端运行 vimtutor
命令,这将启动基本 Vim 命令的教程.
If it is installed on your system, you should try to run vimtutor
command from your terminal, which will start a tutorial of the basic Vim commands.
Rob Wells 的建议关于 * 和 # 也非常中肯.
Rob Wells advice about * and # is also very pertinent.
这篇关于“查找下一个"在 Vim 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文