How to search for keywords in VIM

Time:2020-7-26

With VIM pre installed on Mac OS, how to search keywords quickly when editing text?

case $sapi in
  cli)
    php_cli_binary="${exec_prefix}/bin/${program_prefix}php${program_suffix}${exe_extension}"
    ;;
  cgi)
    php_cgi_binary="${exec_prefix}/bin/${program_prefix}php-cgi${program_suffix}${exe_extension}"
    ;;
  esac

In the above file, our goal is to search for keywordsphpAs long as the following operations

  1. Press ESC key to quickly return to command mode
  2. Input / or?
  3. Then enter the keyword PHP and press enter to search
  4. Use n to browse the location of the next keyword, and N to browse the previous location

How to search for keywords in VIM

Recommended Today

Construction of Vue development environment and project creation under mac

start First of all, let’s take a look at the overall development environment of Vue. Homebrew: package manager under MAC system, similar to apt get under Linux, windows control panel – install and remove program Node.jsJavaScript runtime, which is similar to simultaneous interpretation in international conferences, can’t run various programming languages directly between different systems […]