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

command-line options for Carbon Vim?

Expand Messages
  • Benji Fisher
    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
    Message 1 of 6 , Mar 18, 2002
    • 0 Attachment
      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.

      --Benji Fisher
    • Erlend Aasland
      ... What about this... % echo +100 foo.txt | xargs Vim Erlend Aasland
      Message 2 of 6 , Mar 19, 2002
      • 0 Attachment
        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
      • Benji Fisher
        ... 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
        Message 3 of 6 , Mar 19, 2002
        • 0 Attachment
          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
        • Dragon Green
          Sorry no suggestions, just feedback and questions. I tried the command that Benji Sent out originally, and yes, it starts up the aqua Vim, but leaves it in the
          Message 4 of 6 , Mar 19, 2002
          • 0 Attachment
            Sorry no suggestions, just feedback and questions.

            I tried the command that Benji Sent out originally, and yes, it starts up the aqua Vim, but leaves it in the background. At least it worked the first few times, but after that it wouldn't start all the way. The icon would just bounce and bounce.

            I've had the same problem in the past, when I tried to use Vim with Pseudo, an app that starts other apps as root. The icon would just bounce and bounce.

            I also had a question... Is there any way to open more than one window, or have more than one instance of Vim running at the same time. I can't always do everything in one split window. Under unix I sometimes have 5 or six differnt Vims going at one time, but mac os x doesn't seem to allow it.

            Thank you very much,
            Dragon

            On 19 Mar 2002, Benji Fisher wrote:

            > 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/Conte-
            > >> % nts/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/V-
            > % im.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
          • Dragon Green
            Ok, I answered my own questions. I had a typo that was making Vim not start up all the way... and I can have as many Vims as memory will allow if I start em
            Message 5 of 6 , Mar 19, 2002
            • 0 Attachment
              Ok, I answered my own questions. I had a typo that was making Vim not
              start up all the way... and I can have as many Vims as memory will allow
              if I start 'em command line.

              Still don't know why it wouldn't work with pseudo, but I'd have to know
              more about how pseudo works and that's another list.

              sorry, and thanks again,
              Dragon

              On Tuesday, March 19, 2002, at 10:18 AM, Dragon Green wrote:

              > Sorry no suggestions, just feedback and questions.
              >
              > I tried the command that Benji Sent out originally, and yes, it starts
              > up the aqua Vim, but leaves it in the background. At least it worked
              > the first few times, but after that it wouldn't start all the way. The
              > icon would just bounce and bounce.
              >
              > I've had the same problem in the past, when I tried to use Vim with
              > Pseudo, an app that starts other apps as root. The icon would just
              > bounce and bounce.
              >
              > I also had a question... Is there any way to open more than one window,
              > or have more than one instance of Vim running at the same time. I can't
              > always do everything in one split window. Under unix I sometimes have 5
              > or six differnt Vims going at one time, but mac os x doesn't seem to
              > allow it.
              >
              > Thank you very much,
              > Dragon
              >
              > On 19 Mar 2002, Benji Fisher wrote:
              >
              >> 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/Conte-
              >>>> % nts/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/V-
              >> % im.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
              >
              >
              +*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
              Check out my Domain...
              http://www.skullybat.com

              Never updated!
            • Erlend Aasland
              ... Sorry, I havent got MacOS X, so I cant try it out. It was just the first thing that came to my mind when I read your first post. Erlend Aasland
              Message 6 of 6 , Mar 20, 2002
              • 0 Attachment
                > > What about this...
                > > % echo +100 foo.txt | xargs Vim
                > 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:

                Sorry, I havent got MacOS X, so I cant try it out. It was just the first
                thing that came to my mind when I read your first post.

                Erlend Aasland

                > % 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.
                >
              Your message has been successfully submitted and would be delivered to recipients shortly.