- 命令模式下,输入
/字符串
,比如搜索user,输入/user
,按下回车之后,可以看到vim已经把光标移动到该字符处和高亮了匹配的字符串 - 查看下一个匹配,按下n(小写n)
- 跳转到上一个匹配,按下N(大写N)
Post
Cancel
vi/vim下如何搜索字符串
This post is licensed under
CC BY 4.0
by the author.