How to find a word in Vim or vi text editor

回眸只為那壹抹淺笑 提交于 2020-02-26 13:18:22

I am a new Linux and unix-like operating system user. how to search and find words in Vi/Vim ?

Introduction: vi and vim is a text editor for Linux,macOS,Unix,and *BSD family of operation sysytems.

Find a word in Vim or Vi text editor

To search using Vim/vi, for the current word:

  1. In normal mode,you can search forward or backward.
  2. One can search forward in Vim/Vi by pressing / and then typing your search word.
  3. To search backward in Vim/Vi pressing ? and then typing your search wrod.
  4. Once word found in Vim, you can press the n key to directly to the next occurrence of the word in backwards. Press the N to directly to the opposite direction,i.e. forwards.
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!