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

open from command line

Expand Messages
  • Christian Bird
    I ve been searching the web to find a way to do this, but I can t. If I have gvim running in a window in my desktop, is there any way to have it open another
    Message 1 of 3 , Oct 3, 2006
    • 0 Attachment
      I've been searching the web to find a way to do this, but I can't. If
      I have gvim running in a window in my desktop, is there any way to
      have it open another text file (in a new buffer, tab, whatever, but
      not a new window) from the command line?

      I'd like to do:
      gvim foo.txt
      and have it open an initial gvim app (which it does now) and then do:
      gvim bar.txt
      and have it open it in another tab or another buffer, but not open
      another window. The help mentions the existence of clientserver mode
      and the --remote options, but I can't get those to be built into the
      executable. Any help would be greatly appreciated. Thanks.

      -- Chris

      --
      Christian Bird
      cabird@...
    • David Morel
      ... use Vim instead of gvim, and do open -a Vim your.file ... David Morel ... OpenPGP pubkey : http://www.amakuru.net/dmorel.asc
      Message 2 of 3 , Oct 4, 2006
      • 0 Attachment
        Le 4 oct. 06 à 08:18, Christian Bird a écrit :

        > I've been searching the web to find a way to do this, but I can't. If
        > I have gvim running in a window in my desktop, is there any way to
        > have it open another text file (in a new buffer, tab, whatever, but
        > not a new window) from the command line?

        use Vim instead of gvim, and do open -a Vim your.file

        >
        > I'd like to do:
        > gvim foo.txt
        > and have it open an initial gvim app (which it does now) and then do:
        > gvim bar.txt
        > and have it open it in another tab or another buffer, but not open
        > another window. The help mentions the existence of clientserver mode
        > and the --remote options, but I can't get those to be built into the
        > executable. Any help would be greatly appreciated. Thanks.
        >
        > -- Chris
        >
        > --
        > Christian Bird
        > cabird@...

        David Morel <david.morel@...>
        -----------------------------------
        OpenPGP pubkey :
        http://www.amakuru.net/dmorel.asc
      • Michael Sommerville
        ... I hacked around with this a while back (6.3). Dragging from finder does this if you hold the shift key when dropping into the editor. I haven t looked at
        Message 3 of 3 , Oct 4, 2006
        • 0 Attachment
          On 10/4/06, Christian Bird <cabird@...> wrote:
          > I've been searching the web to find a way to do this, but I can't. If
          > I have gvim running in a window in my desktop, is there any way to
          > have it open another text file (in a new buffer, tab, whatever, but
          > not a new window) from the command line?
          >
          > I'd like to do:
          > gvim foo.txt
          > and have it open an initial gvim app (which it does now) and then do:
          > gvim bar.txt
          > and have it open it in another tab or another buffer, but not open
          > another window. The help mentions the existence of clientserver mode
          > and the --remote options, but I can't get those to be built into the
          > executable. Any help would be greatly appreciated. Thanks.

          I hacked around with this a while back (6.3). Dragging from finder
          does this if you hold the shift key when dropping into the editor. I
          haven't looked at the current sources, so this may have changed
          somewhat. I did the following:

          gui_mac.c: change handle_drop() so that the last arg is TRUE which
          forces the window to split for the new file.

          From the command line:

          open -a <path/to/bundle>/Vim.app <file>

          I haven't tested this much but it works for me.

          -Michael
        Your message has been successfully submitted and would be delivered to recipients shortly.