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

input from commandline?

Expand Messages
  • rene@xs4all.nl
    how do I get gvim to accept input from the commandline, eg the output of another program? and, is there any way to execute a temporary set of commands before
    Message 1 of 3 , Aug 2, 2001
    • 0 Attachment
      how do I get gvim to accept input from the commandline, eg the output of another program?
      and, is there any way to execute a temporary set of commands before and/or after loading the input from the
      commandline? I'd also like to be able to execute a set of commands when vim closes.

      I think the solution to this is a set of files that could-or-not-be-there-(in-my-homedir). then whenever I need to
      execute commands I simply populate those files, execute and done. But that might interfere with multiple open VIM
      editors, so I'd love to hear suggestions.
    • Erik Janssen
      Dig in the help ... /FilterReadPre (I think) /VimLeave Erik.
      Message 2 of 3 , Aug 2, 2001
      • 0 Attachment
        Dig in the help

        :h :r!

        :h autocmd
        /FilterReadPre (I think)
        /VimLeave

        Erik.


        rene@... wrote:
        >
        > how do I get gvim to accept input from the commandline, eg the output of another program?
        > and, is there any way to execute a temporary set of commands before and/or after loading the input from the
        > commandline? I'd also like to be able to execute a set of commands when vim closes.
        >
        > I think the solution to this is a set of files that could-or-not-be-there-(in-my-homedir). then whenever I need to
        > execute commands I simply populate those files, execute and done. But that might interfere with multiple open VIM
        > editors, so I'd love to hear suggestions.
      • Roel Vanhout
        ... Put a - after vim on the command line to read from standard input. ... You can use -c to execute commands on startup, don t know about
        Message 3 of 3 , Aug 2, 2001
        • 0 Attachment
          On Thu, Aug 02, 2001 at 12:07:10PM +0200, rene@... wrote:
          > how do I get gvim to accept input from the commandline, eg the output
          > of another program?

          Put a '-' after 'vim' on the command line to read from standard input.

          > and, is there any way to execute a temporary set
          > of commands before and/or after loading the input from the
          > commandline? I'd also like to be able to execute a set of commands
          > when vim closes.

          You can use -c <command> to execute commands on startup, don't know
          about executing when vim closes.

          cheers,

          roel


          --
          In God we Trust - all others must submit an x.509 certificate
        Your message has been successfully submitted and would be delivered to recipients shortly.