In Vi or Vim, use the forward slash </> to search. Then type in your search string and hit <Enter>. You can navigate through occurrences of your search string using <n> to move forward and <N> to move backwards. Below is an example search for the string ‘array’.
If you do not want Vim to highlight searches, set the following in your ~/.vimrc
To wrap searches around the file when using <n> and <N>, set the following in your ~/.vimrc