On 01/02/09 21:13, JuanPablo wrote:
> hi,
> how redirect output command (r!) to new buffer?
> thanks.
:r! filename
is not an output command but an input command. It merges the given
filename after the current line (or, with a [range], the given line) of
the current buffer.
:r !command
runs an external command and reads the output of that command into the
current buffer. The order of space and exclamation mark is important.
If you want to capture the output of an ex-command which displays
messages on the message area (below the bottom status line), you can use
the ":redir" command, whose output can be a register (including the
unnamed register and the clipboard), a disk file, or a string variable,
and in either "replace" or "append" modes in all cases. Then you can
either read the file (thus assigning a buffer to it), or paste the
register or (via the expression register) the variable into any buffer
including a [No Name] buffer.
Best regards,
Tony.
--
Dessert is probably the most important stage of the meal, since it will
be the last thing your guests remember before they pass out all over
the table.
-- The Anarchist Cookbook
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---