sponsor Vim development Vim logo Vim Book Ad

basic Tip #13: Incremental search

 tip karma   Rating 449/157, Viewed by 7985 

Read and edit this tip on the Vim tip wiki. The wiki may have a more recent version of this tip.

created:   February 24, 2001 18:02      complexity:   basic
author:   Yegappan      as of Vim:   5.7


To move the cursor to the matched string, while typing the search
string, set the following option in the .vimrc file:

        set incsearch

You can complete the search by pressing the Enter key.  To cancel
the search, press the escape key.

 rate this tip  Life Changing Helpful Unfulfilling 

<< Converting tabs to spaces | Highlighting all the search pattern matches >>

Additional Notes

[email protected], September 10, 2004 3:07
How do I jump to the next match while doing incremental search?  I want to jump before pressing enter.
[email protected], December 13, 2004 16:54
why not just hit 'n' after you hit enter?
[email protected], December 15, 2004 3:39
Well, an emacs user challenged me to do it during incremental search, and I couldn't give him an answer, so was wondering if anyone else did.
[email protected], December 3, 2005 14:46
You can jump to any match by specifying a number before the / is pressed.

i.e. 2/some_text
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo