I mean the :filter command, not the external one. I want to filter the filtered results again, if not clear. The trivial try didn't work - :filter /abc/ filter /cbd/ %list


As documented in :help :filter:

Only some commands support filtering, try it out to check if it works.

And that is followed by a list of "some of the commands that support filtering", which includes :list and about a dozen of others.

Even if the documentation mentions that list might be comprehensive, I think it makes a point that not all and actually not many commands support :filter and since filtering a :filter can be done in a different way (for instance, a regex using \& to match two separate patterns) I would expect such a feature wasn't really considered.

For your particular match, you can use:

:filter /.*abc\&.*cbd/ %list
  • 1
    yeh. I knew about the option to do \&. :g supports recursive behavior. Also in this case, it could have been done otherwise. – eyal karni Jun 7 '20 at 20:23

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.