How can I invert a helm-swoop match, i.e. how can I show all lines not matching the pattern?

1 Answer 1


If you begin the pattern with an exclamation point, it will match lines that do not match the pattern.

So !window will match all lines that do not have window on them.

This is a helm feature, so you can use it in other places than just helm swoop.

Also note that it doesn't negate the entire search, just the token beginning with !, so you can search for, e.g., defun !--, and it will show you all lines with function definitions (defun), for public functions (i.e., they do not have -- in the name).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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