9 Mar 2008 marcioandreyoliveira   » (Journeyer)

Looking for many words at once

I use Vim daily and my admiration for it always is renewed. It has so may features that I doubt any one can use 100% of its capacity.

One of the Vim's features I like too much is its ability to search different words at once in text.

When we want to find a word we enter in command mode and we type:

/word <ENTER>

- But what if we want to find two or more words ? Do we need to do separate searches?

No! We do just one search in command mode with each word separated by escaped pipes (\|) :

/word1\|word2\|word3 <ENTER>

Figure 1 shows a search for four words. Notice that spaces are considered as part of the word we are looking for.


Figure 2 shows the result of the search.


I hope this tip will be as useful for you as it is for me.

Syndicated 2008-01-30 16:37:00 from Marcio Andrey Oliveira

Latest blog entries     Older blog entries

New Advogato Features

FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!