Home vi/vim下如何搜索字符串
Post
Cancel

vi/vim下如何搜索字符串

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