VIM Editor
Searching in VIM
In this tutorial I explain how to search and replace strings in VIM. VIM is the best tool for programmers. It supports almost all languages (may exclude VB, VC, VC++).
Its a superb editor with tons of features. Yeah a little complicated thing for newbies. But you have their full support mailing list, vimtutor - the application which teaches you VIM online (not on the web!).
So how to search and replace strings in VIM ?
Searching-
There are two ways to search - forward and backward.
Searching forward means from the point where you are currently to the end of the file.
Searching backward means from the point where you are currently to the top of the file.
To search forward,
Exit Insert Mode by pressing Escape key. This will make VIM work on command mode.
Type
/
If you have spaces in you must escape them with a backslash(\).
For Ex: /WORD1\ WORD2
The above command will search for WORD1 WORD2 (note the space in the words).
To search backward all steps are same except instead of / you use ? (question mark).
To Find Next, (forward) press n, (backward) press N [Shift+N].
You can also use Regular Expressions in search string. More about searching in next tutorial.
Download VIM: VIM.ORG
Recent comments
1 hour 1 min ago
1 day 20 hours ago
2 days 10 hours ago
2 weeks 3 days ago
2 weeks 5 days ago
3 weeks 16 hours ago
3 weeks 5 days ago
3 weeks 6 days ago
4 weeks 1 day ago
4 weeks 1 day ago