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

Re: Pathing issue (cmd line invocation trouble)

Expand Messages
  • Matthew J. Stott
    The Panther version of vim 6.2 console (no GUI) is located in /usr/bin which is in your path. You can do several things, but the easiest most reliable (will
    Message 1 of 5 , Dec 3, 2004
      The Panther version of vim 6.2 console (no GUI) is located in /usr/bin
      which is in your path.

      You can do several things, but the easiest most reliable (will
      withstand an Apple upgrade),
      would be to create an alias to point vim to the ViM 6.3 version at the
      console.

      Within ~/.profile or ~/.bashrc (dotfile within your home directory)

      alias vim="/Applications/Vim.app/Contents/MacOS/Vim"

      This will substitute vim with /Applications/Vim.app/Contents/MacOS/Vim
      whenever you type vim
      at the console. If you pass the parameter -g to the vim alias, it will
      then launch the GUI Vim. You
      could create another alias to handle the GUI version.

      alias gvim="/Applications/Vim.app/Contents/MacOS/Vim -g"

      Obviously, change the path from
      /Applications/Vim.app/Contents/MacOS/Vim to
      /Developer/Vim.app/Contents/MacOS/Vim or where you installed Vim.app.
      (.app is hidden in Apple finder but visible from console).

      You specify color schemes inside your .vimrc or .gvimrc. The .vimrc is
      used by the console
      vim and .gvimrc is used when the GUI vim is launched. If you want both
      to be the same just
      use .vimrc.

      Within ~/.vimrc

      syntax on
      colorscheme torte

      I've specified torte but there are many others. Launch the GUI vim and
      click Edit then Colorscheme
      and try a few of them out. Decide which one you like best and set it
      in your .vimrc file.





      On Dec 2, 2004, at 11:56 PM, Unnsse Khan wrote:

      > If I downloaded the latest version of vim to /Developer/vim/
      >
      > How do I set the path where I can invoke gvim from the command line by
      > typing gvim?
      >
      > Also, how do I set the background to black and the foreground to white?
    • Chris Devers
      ... Which is to say, you use sudo, because in the 21st century almost no one ever needs to be root to do anything reasonable, especially on a Mac. So, the
      Message 2 of 5 , Dec 3, 2004
        On Fri, 3 Dec 2004, David Fortin wrote:

        > Copy the gvim executable to your path.
        > To see your path type `echo $PATH` This will give you
        > output such as: /bin:/sbin:/usr/bin:/usr/sbin
        > All of these directories are searched when a command is typed
        > at the command line.
        >
        > /vim/gvim.app/Contents/MacOS/gvim is the executable.
        >
        > You will need to be root to do this.

        Which is to say, you use sudo, because in the 21st century almost no one
        ever needs to be root to do anything reasonable, especially on a Mac.

        So, the proper command might be something like this:

        $ sudo ln -s /path/to/Vim.app/Contents/MacOS/gvim /usr/local/bin/

        Or if you have a collection of scripts in your ~/bin, then dispense with
        sudo altogether:

        $ ln -s /path/to/Vim.app/Contents/MacOS/gvim ~/bin/

        (If ~/bin isn't in your path, edit the relevant ~/.*shrc to add it.)

        > You may need to log out of the terminal after you copy this file into
        > your path.

        If you're using tcsh, a `rehash` should make the link visible.

        If you're using bash, it should be available automatically.

        If you've edited your path, `source ~/.tcshrc` will work for tcsh and
        `source ~/.bashrc` will work for bash.



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