Let me start with the scenario: I am using GVIM on windows-
Problem: I need to scroll the out put pressing spacebar or other keys to get this output to a new file.
Is there anyway I may skip scrolling without loosing results?
As others have said, filtering is done more easily outside of Vim with tools like grep
, but if you must...
:redir
, you can use :silent global/...
to suppress the output within GVIM. It will still be captured by :redir
.:g/<pattern>/p
to filter matching lines, you could alternatively use :vglobal/<pattern>/d
to delete non-matching lines, then persist what remains via :w another-filename
.