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

Is it possible to redirect the output of shell command to QuickFix?

Expand Messages
  • Dahong Tang
    Hi, The command :%! ls -al redirects the output of the shell command, in this case ls -al, to the current buffer. But instead of the current buffer, I want to
    Message 1 of 3 , Jul 27, 2013
    • 0 Attachment
      Hi,

      The command :%! ls -al redirects the output of the shell command, in this case ls -al, to the current buffer. But instead of the current buffer, I want to redirect the output of shell command to QuickFix. Does anyone know if this is possible? If so, can you please give an example? Thanks!

      --
      --
      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

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Suresh Govindachar
      ... Browsing :help quickfix and using some other info, the following is ... --Suresh -- -- You received this message from the vim_use maillist. Do not
      Message 2 of 3 , Jul 27, 2013
      • 0 Attachment
        On 7/27/2013 7:27 PM, Dahong Tang wrote:
        > Hi,
        >
        > The command :%! ls -al redirects the output of the shell command, in this case ls -al, to the current buffer. But instead of the current buffer, I want to redirect the output of shell command to QuickFix. Does anyone know if this is possible? If so, can you please give an example? Thanks!
        >

        Browsing :help quickfix and using some other info, the following is
        likely to do what you are seeking to do:

        :cexpr system('ls -al') | copen

        --Suresh

        --
        --
        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

        ---
        You received this message because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Dahong Tang
        ... Ah, I didn t know the cexpr command. Thank you! -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the
        Message 3 of 3 , Jul 27, 2013
        • 0 Attachment
          On Saturday, July 27, 2013 11:09:17 PM UTC-5, Suresh Govindachar wrote:
          > On 7/27/2013 7:27 PM, Dahong Tang wrote:
          >
          > > Hi,
          >
          > >
          >
          > > The command :%! ls -al redirects the output of the shell command, in this case ls -al, to the current buffer. But instead of the current buffer, I want to redirect the output of shell command to QuickFix. Does anyone know if this is possible? If so, can you please give an example? Thanks!
          >
          > >
          >
          >
          >
          > Browsing :help quickfix and using some other info, the following is
          >
          > likely to do what you are seeking to do:
          >
          >
          >
          > :cexpr system('ls -al') | copen
          >
          >
          >
          > --Suresh

          Ah, I didn't know the cexpr command. Thank you!

          --
          --
          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

          ---
          You received this message because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        Your message has been successfully submitted and would be delivered to recipients shortly.