User Tools

Site Tools


vim:search

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
vim:search [2022/07/19 15:15] – created 85.203.36.253vim:search [2022/07/19 15:22] (current) 85.203.36.253
Line 1: Line 1:
 ====== VIM - Search ====== ====== VIM - Search ======
 +
 +===== Simple Search =====
  
 Search for the specific **/pattern**: Search for the specific **/pattern**:
Line 6: Line 8:
 /pattern /pattern
 </code> </code>
 +
 +<WRAP info>
 +**NOTE:**  **pattern** is the search word.
 +</WRAP>
 +
 +
 +----
 +
 +===== Search for other occurrences of the same word =====
 +
 +To search for other occurrences of the same word the cursor is on, use the **<nowiki>*</nowiki>** command. 
 +
 +<code vim>
 +*
 +</code>
 +
 +
 +<WRAP info>
 +**NOTE:**  It will grab the word from under the cursor and search for the next one.
 +</WRAP>
 +
 +
 +----
 +
 +===== Incremental Search =====
 +
 +If the **incsearch** option is set, Vim will show the first match for the pattern, while you are still typing it. 
 +
 +<WRAP info>
 +**NOTE:**  This quickly shows a typo in the pattern.
 +</WRAP>
 +
 +----
 +
 +===== Highlight Search =====
 +
 +If the **hlsearch** option is set, Vim will highlight all matches for the pattern with a yellow background.
 +
 +----
 +
 +
vim/search.1658243710.txt.gz · Last modified: 2022/07/19 15:15 by 85.203.36.253

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki