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

7082Re: upgrading vim from Leopard default installation to Macports

Expand Messages
  • aireydc
    Apr 1, 2008
    • 0 Attachment
      Thank you all, for the kind and informative help.I have resolved my
      problem.

      I used vim to create a ~/.profile file (I did not have one) containing
      the lines:

      export PATH=/opt/local/bin:/opt/local/sbin:$PATH
      export MANPATH=/opt/local/share/man:$MANPATH

      And now a Vim command in the Terminal (bash) correctly runs the up to
      date MacPorts version.

      MacPorts 1.6 (1.7 due soon) will let you install, remove, and keep up
      to date, many unix ports to OS X Leopard, all with simple one line
      commands.

      Now that I resolved that one, I'll check out MacVim to see if it is
      keep parallel with Vim.

      -Dave

      On Mar 31, 11:32 pm, Andy Todd <and...@...> wrote:
      > aireydc wrote:
      > > A little more information may help someone help me...
      >
      > > After installation via MacPorts, I have vim installed in two
      > > locations:
      >
      > > the installation that came with Leopard (version 7.0) is here:
      >
      > > /usr/bin/vim
      >
      > > and the installation from MacPorts (version 7.1) is here:
      >
      > > /opt/local/bin/vim
      >
      > > When I type vim in the terminal, I get /usr/bin/vim. Maybe because of
      > > the bug in MacPorts 1.6, I have no path set to /opt/local/bin/? Anyway
      > > if some could explain how I rest my vim command to point to the right
      > > version I would appreciate it.
      >
      > > On Mar 31, 8:49 pm, aireydc <david.c.ai...@...> wrote:
      > >> I managed to install X11, Xcode, and MacPorts on my Mac OS X Leopard
      > >> today, with the intention of installing Vim 7.1 (watch out for a bug
      > >> in MacPorts 1.6 that causes it to fail to install the .profile file!).
      > >> Because I did not have the .profile file, I had to give the path to
      > >> port in the following Terminal command:
      >
      > >> sudo /opt/local/bin/port install vim
      >
      > >> This installed vim 7.1, but when I type vim in my bash terminal, I
      > >> still get the original 7.0.x version that likely came with the Leopard
      > >> installation. Does anyone know how to fix this?
      >
      > >> -Dave
      >
      > In Unix (which is close enough to the underlying operating system of OS
      > X to not matter much) when you type something at the command line it
      > searches amongst a defined list of directories looking for a program
      > that has the same name as the command you typed.
      >
      > This list of directories is stored in the PATH environment variable. It
      > is explained in more detail here;
      >
      > http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_vari...
      >
      > Because /usr/bin appears in your PATH and /opt/local/bin doesn't it will
      > run the program from that location rather than the one you want.
      >
      > Your options are to always use a fully qualified path to the Vim you
      > wish to run (e.g. /opt/local/bin/vim) or to put /opt/local/bin in your
      > PATH before any other directory to make sure that programs in that
      > directory are picked up before the system versions.
      >
      > Or, you could set up an alias to /opt/local/vim, but that requires a
      > different set of commands.
      >
      > Regards,
      > Andy
      > --
      >  From the desk of Andrew J Todd esq -http://www.halfcooked.com/
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Show all 16 messages in this topic