Skip to main content
Typo...
Source Link
jasonwryan
  • 74.8k
  • 35
  • 204
  • 230

You can use :redir for this:

                                                        *:redi* *:redir*
:redi[r][!] > {file}    Redirect messages to file {file}.  The messages which
                        are the output of commands are written to that file,
                        until redirection ends.  The messages are also still
                        shown on the screen.  When [!] is included, an
                        existing file is overwritten.  When [!] is omitted,
                        and {file} exists, this command fails.
                        Only one ":redir" can be active at a time.  Calls to
                        ":redir" will close any active redirection before
                        starting redirection to the new target.

So, to capture your desired messages and append them to the current file:

:redir +@@+
:g/vanished/
:g/send_files/
:g/any_other_regex_you_want/
:redir END
"+P

This will send regex matches to the clipboard register (@+) and then you paste them into the current document: "+P.

You can use :redir for this:

                                                        *:redi* *:redir*
:redi[r][!] > {file}    Redirect messages to file {file}.  The messages which
                        are the output of commands are written to that file,
                        until redirection ends.  The messages are also still
                        shown on the screen.  When [!] is included, an
                        existing file is overwritten.  When [!] is omitted,
                        and {file} exists, this command fails.
                        Only one ":redir" can be active at a time.  Calls to
                        ":redir" will close any active redirection before
                        starting redirection to the new target.

So, to capture your desired messages and append them to the current file:

:redir +@
:g/vanished/
:g/send_files/
:g/any_other_regex_you_want/
:redir END
"+P

This will send regex matches to the clipboard register (@+) and then you paste them into the current document: "+P.

You can use :redir for this:

                                                        *:redi* *:redir*
:redi[r][!] > {file}    Redirect messages to file {file}.  The messages which
                        are the output of commands are written to that file,
                        until redirection ends.  The messages are also still
                        shown on the screen.  When [!] is included, an
                        existing file is overwritten.  When [!] is omitted,
                        and {file} exists, this command fails.
                        Only one ":redir" can be active at a time.  Calls to
                        ":redir" will close any active redirection before
                        starting redirection to the new target.

So, to capture your desired messages and append them to the current file:

:redir @+
:g/vanished/
:g/send_files/
:g/any_other_regex_you_want/
:redir END
"+P

This will send regex matches to the clipboard register (@+) and then you paste them into the current document: "+P.

Source Link
jasonwryan
  • 74.8k
  • 35
  • 204
  • 230

You can use :redir for this:

                                                        *:redi* *:redir*
:redi[r][!] > {file}    Redirect messages to file {file}.  The messages which
                        are the output of commands are written to that file,
                        until redirection ends.  The messages are also still
                        shown on the screen.  When [!] is included, an
                        existing file is overwritten.  When [!] is omitted,
                        and {file} exists, this command fails.
                        Only one ":redir" can be active at a time.  Calls to
                        ":redir" will close any active redirection before
                        starting redirection to the new target.

So, to capture your desired messages and append them to the current file:

:redir +@
:g/vanished/
:g/send_files/
:g/any_other_regex_you_want/
:redir END
"+P

This will send regex matches to the clipboard register (@+) and then you paste them into the current document: "+P.