Loading ...
Sorry, an error occurred while loading the content.
 

Re: vim: use external program, but direct output to a new vsplitted buffer

Expand Messages
  • ping
    ... hi Ben, yes that is a typo when I write email, I use w when I tested. ... I assume that s why... thanks aw. regards ping -- You received this message from
    Message 1 of 11 , Jun 29, 2012
      On 06/29/2012 11:40 AM, Ben Fritz wrote:

      >> so using another tip I learned from a previous thread, how about this:
      >>
      >> "redirect output to reg z
      >> :redir @z
      >> "take seleted text as input, output to screen
      >> :'<,'> !asciidoc ...
      >
      > You forgot the w. But maybe it's just a typo.
      >
      > :'<,'>w !asciidoc
      >
      > See :help :w_c.
      >
      >> "end redirection
      >> :redir END
      >> "open a vsplit win
      >> :vsp
      >> "paste content of reg z
      >> "zp
      >>

      hi Ben,
      yes that is a typo when I write email, I use w when I tested.

      gary said in his reply:
      :redir redirects the output of Vim commands, not shell commands.

      I assume that's why...

      thanks aw.

      regards
      ping

      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Benjamin Fritz
      ... Nope! The first is using the :w command to pass some lines to an external command. The second is invoking the external command directly, passing in the
      Message 2 of 11 , Jul 12, 2012
        On Thu, Jul 12, 2012 at 4:24 PM, ping <songpingemail@...> wrote:
        > hi Ben:
        > just came cross this tiny issue again, so shouldn't
        >
        > :'<,'>w !asciidoc
        >
        > exactly the same as:
        >
        > :'<,'>!asciidoc
        >
        > ?
        >

        Nope! The first is using the :w command to pass some lines to an
        external command.

        The second is invoking the external command directly, passing in the
        lines, and placing the result back into the buffer to replace the
        lines passed in.

        They are two separate commands, they do different things.

        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      Your message has been successfully submitted and would be delivered to recipients shortly.