Is there script or function for vim to do search of words that is not in proper location (sorry, i don't know how to put it in question) ?

Example: This is a vim user who like the functionality which is pure manual power.

Question: I want to search a sentence which contains words "power, vim , functionality".

I have to remember the order of the keywords to do search:


Only in this way, the result will be yielded. Which is not useful.

But if i don't remember the arrangement of those keywords.. Hence when i do a search :


It will not give me the result i wanted.

What is the solution ?

Thank You in advance.


2 Answers 2


You can use a branch syntax \&,


would find all lines containing all of these three words

Note that the .* are necessary as branch attempts to match all parts at the same location.


I think this is the only solution, i tried and it works too:



It will highlight the line with the words even when in random order.

  • 2
    this is any of not all of
    – Mass
    May 14 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.