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

7079Re: upgrading vim from Leopard default installation to Macports

Expand Messages
  • Morel David
    Apr 1, 2008
    • 0 Attachment
      Le 1 avr. 08 à 10:15, Ben Schmidt a écrit :

      >
      > Morel David wrote:
      >> Le 1 avr. 08 à 08:20, Ben Schmidt a écrit :
      >>> aireydc 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
      >>
      >> you also have environment.plist for each user in ~/Library/
      >> Preferences
      >> IIRC
      >>
      >> David
      >
      > ~/.MacOSX/Environment.plist, I believe. But any PATH set in this
      > file is usually
      > overridden by the /etc/profile or similar file when you start a
      > shell, so setting
      > a PATH there doesn't work. It is possibly useful for setting the
      > PATH for GUI
      > programs (though I doubt it would be truly useful as they usually
      > don't use it
      > anyway) or other environment variables (e.g. I set variables to turn
      > on
      > Thunderbird debugging there).
      >

      Yup. I have CVSIGNORE, MANPATH, RSYNC_RSH and other stuff in there.
      PATH is duly squashed in /etc/profile

      David


      > Ben.
      >
      >>> I'm not sure what MacPorts usually does, but here is a solution
      >>> which is how I've
      >>> done it on my system...
      >>>
      >>> sudo vim /etc/profile
      >>>
      >>> If your system is configured like mine, near the top of that file
      >>> you will find a
      >>> line that says PATH=something. After the = sign, possibly inside
      >>> quotation marks,
      >>> but before anything else, if you add
      >>>
      >>> /opt/local/bin:/opt/local/sbin:
      >>>
      >>> that should fix it. The line should then read something like this:
      >>>
      >>> PATH="/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin"
      >>>
      >>> The PATH environment variable, which is set as a shell variable and
      >>> then exported
      >>> to an environment variable in /etc/profile, is a list of directories
      >>> that are
      >>> searched in order for programs to run as commands when you type
      >>> them.
      >>>
      >>> The change won't take effect until you close your terminal window(s)
      >>> and open new
      >>> ones.
      >>>
      >>> If you use a non-Bourne-style shell (i.e. one that doesn't use /etc/
      >>> profile) you
      >>> will have to alter a different configuration file in a similar way,
      >>> e.g.
      >>> /etc/csh.login.
      >>>
      >>> Hope this helps!
      >>>
      >>> Ben.
      >>>
      >>>
      >>>
      >>>
      >>
      >>
      >>>
      >>
      >
      > >


      --~--~---------~--~----~------------~-------~--~----~
      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