Archive for the ‘vim’ Category

  • Search for a word
/search_word
  • Search ignore case
/\csearch_word
  • Incremental search

With incremental search you can view the matches as you type, no need to type the whole word.

:set incsearch
  • Highlight search matching word.
:set hlsearch
  • Smartcase

Search case sensitively if caps letters are in search pattern.

:set ignorecase smartcase
  • Type “*”  to search for the word under the cursor
  • Search for whole word
\<search_term\>

Here “/<” represents the start of the word and “\>” represents the end of the word

Advertisements