Searching for any one of a set or words ?

2014-09-20 Thread Philip Rhoades
People, If I have words in a file - either on the same or separate lines - is it possible, within vim (I could probably do what I want with a shell script and grep) to search for _any_ of the words in the set? eg I have a file with words: quick fox lazy dog and I have a text file open in

Re: Searching for any one of a set or words ?

2014-09-20 Thread Tim Chase
On 2014-09-20 23:09, Philip Rhoades wrote: If I have words in a file - either on the same or separate lines - is it possible, within vim (I could probably do what I want with a shell script and grep) to search for _any_ of the words in the set? eg I have a file with words: quick fox

Re: Searching for any one of a set or words ?

2014-09-20 Thread Nicolas Dermine
hi Philip, On Sat, Sep 20, 2014 at 3:09 PM, Philip Rhoades p...@pricom.com.au wrote: People, If I have words in a file - either on the same or separate lines - is it possible, within vim (I could probably do what I want with a shell script and grep) to search for _any_ of the words in the

Re: Searching for any one of a set or words ?

2014-09-20 Thread Philip Rhoades
Tim, Nico, On 2014-09-20 23:42, Tim Chase wrote: On 2014-09-20 23:09, Philip Rhoades wrote: If I have words in a file - either on the same or separate lines - is it possible, within vim (I could probably do what I want with a shell script and grep) to search for _any_ of the words in the set?

Re: Searching for any one of a set or words ?

2014-09-20 Thread Philip Rhoades
Tim, On 2014-09-20 23:42, Tim Chase wrote: On 2014-09-20 23:09, Philip Rhoades wrote: If I have words in a file - either on the same or separate lines - is it possible, within vim (I could probably do what I want with a shell script and grep) to search for _any_ of the words in the set? eg I

Re: Searching for any one of a set or words ?

2014-09-20 Thread Tim Chase
On 2014-09-21 01:10, Philip Rhoades wrote: :new create an empty buffer :r words.txt read your wordlist into it :%s/\_s\+/\\|/g convert all whitespace including newlines to \|, the or conjunction in a regexp :y a yank that into the a