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

555Re: command-line options for Carbon Vim

Expand Messages
  • Benji Fisher
    Mar 19, 2002
      On Tuesday, March 19, 2002, at 05:45 AM, Erlend Aasland wrote:

      > On Mon, 18 Mar 2002, Benji Fisher wrote:
      >> Can anyone think of a way to send a command-line option to
      >> Carbon vim
      >> on Mac OS X? For example, the analogue of
      >> % gvim +100 foo.txt
      >> to open foo.txt and start at line 100. I can start vim with
      >> % open -a Vim foo.txt
      >> but I cannot figure out how to pass options as well as a file name.
      >> Hmm..
      >> .
      >> % tcsh -c '/Applications/vim/Vim.app/Contents/MacOS/Vim -g +100
      >> foo.txt &'
      >> almost works, but Terminal remains the active application.
      > What about this...
      > % echo +100 foo.txt | xargs Vim
      > Erlend Aasland

      Does this work for you? I tried it (without the +100) and it
      started up the non-gui vim. Then I tried giving a path to the Carbon
      executable, and it started that up in Terminal mode. Then I gave it the
      -g flag:

      % echo -g foo.txt | xargs /Applications/vim/Vim.app/Contents/MacOS/Vim

      and this worked about as well as my previous attempt: Terminal, not
      Vim, has the focus. It also spit out an error about allocating
      grey90. :-( <try again> That last bit is a difference between my home
      and office machines: I get the error message at the office either way.

      Any other suggestions?

      --Benji Fisher
    • Show all 6 messages in this topic