Vim incremental search

前端 未结 1 1963
悲&欢浪女
悲&欢浪女 2021-01-01 08:53

I\'m using putty on a Linux machine. My usual method for searching in vi is entering the slash /, then my search string, enter, then go through all the matches by

相关标签:
1条回答
  • 2021-01-01 09:05

    If you're using vim (and who isn't nowadays), you can enable incremental search with:

    :set incsearch
    

    Then just use the regular search command / and it will move the highlight as you add characters to the search string.

    I also like hlsearch as well since it highlights all found items (once the search command is done) for easy viewing.

    0 讨论(0)
提交回复
热议问题