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

Re: upgrading vim from Leopard default installation to Macports

Expand Messages
  • Ted Pavlic
    As discussed elsewhere, I think you ll be much happier with MacVim: http://code.google.com/p/macvim/ If you d like, you can alias gvim to mvim .
    Message 1 of 16 , Apr 1 5:13 AM
    • 0 Attachment
      As discussed elsewhere, I think you'll be much happier with MacVim:

      http://code.google.com/p/macvim/

      If you'd like, you can alias "gvim" to "mvim". Additionally, you can
      still use "vim" to open a Terminal vim.

      --Ted


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

      --
      Ted Pavlic <ted@...>

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • aireydc
      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:
      Message 2 of 16 , Apr 1 7:56 AM
      • 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
        -~----------~----~----~----~------~----~------~--~---
      • Ben Schmidt
        ... I expect you know, but it may be worth noting, that this will only work for the one user. In particular, if you sudo vim, you will still run the OS X
        Message 3 of 16 , Apr 1 8:07 AM
        • 0 Attachment
          > 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

          I expect you know, but it may be worth noting, that this will only work for the
          one user.

          In particular, if you sudo vim, you will still run the OS X installed Vim. This
          may be what you want, but it may not be (it isn't what I want).

          Cheers,

          Ben.




          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • aireydc
          I understand. I have changed my user profile, not the system profile, and even if I m administrator, those user changes affect only the user. To change all
          Message 4 of 16 , Apr 1 12:23 PM
          • 0 Attachment
            I understand. I have changed my user profile, not the system profile,
            and even if I'm administrator, those user changes affect only the
            user. To change all users' access to vim in /opt/local/bin, and the
            adminitrator (when sudo is invoked) I need to edit my /etc/path file.
            Thank you again. I'll do that.

            On Apr 1, 10:07 am, Ben Schmidt <mail_ben_schm...@...> wrote:
            > > 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
            >
            > I expect you know, but it may be worth noting, that this will only work for the
            > one user.
            >
            > In particular, if you sudo vim, you will still run the OS X installed Vim. This
            > may be what you want, but it may not be (it isn't what I want).
            >
            > Cheers,
            >
            > Ben.
            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • vivacarlie
            I would resent saying that macports VIM is inferior to mac vim because sometimes you just want a console window. sure you can pass things to the gui version of
            Message 5 of 16 , Apr 3 8:23 AM
            • 0 Attachment
              I would resent saying that macports VIM is inferior to mac vim because
              sometimes you just want a console window. sure you can pass things to
              the gui version of vim with mvim but what if you really don't want to
              wait for it to start up. besides you can just let macports build the
              proper vim variant to support varius script plugins like python ruby
              or perl.

              On Apr 1, 2:23 pm, aireydc <david.c.ai...@...> wrote:
              > I understand. I have changed my user profile, not the system profile,
              > and even if I'm administrator, those user changes affect only the
              > user. To change all users' access to vim in /opt/local/bin, and the
              > adminitrator (when sudo is invoked) I need to edit my /etc/path file.
              > Thank you again. I'll do that.
              >
              > On Apr 1, 10:07 am, Ben Schmidt <mail_ben_schm...@...> wrote:
              >
              > > > 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
              >
              > > I expect you know, but it may be worth noting, that this will only work for the
              > > one user.
              >
              > > In particular, if you sudo vim, you will still run the OS X installed Vim. This
              > > may be what you want, but it may not be (it isn't what I want).
              >
              > > Cheers,
              >
              > > Ben.
              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_mac" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • Nico Weber
              ... For what it s worth, you can use `alias vim=/Applications/MacVim.app/ Contents/MacOS/Vim` to use the vim that ships with MacVim in terminal mode. Which of
              Message 6 of 16 , Apr 3 8:28 AM
              • 0 Attachment
                > I would resent saying that macports VIM is inferior to mac vim because
                > sometimes you just want a console window. sure you can pass things to
                > the gui version of vim with mvim but what if you really don't want to
                > wait for it to start up.

                For what it's worth, you can use `alias vim=/Applications/MacVim.app/
                Contents/MacOS/Vim` to use the vim that ships with MacVim in terminal
                mode.

                Which of course doesn't mean you'd always want to do it that way :-P

                Nico

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_mac" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Ted Pavlic
                Additionally, MacVim ships with an mvim script that loads Terminal vim when it s called as vim . If you symlink that mvim script to vim , you get a
                Message 7 of 16 , Apr 3 9:02 AM
                • 0 Attachment
                  Additionally, MacVim ships with an "mvim" script that loads Terminal vim
                  when it's called as "vim".

                  If you symlink that mvim script to "vim", you get a terminal window.

                  --Ted


                  Nico Weber wrote:
                  >> I would resent saying that macports VIM is inferior to mac vim because
                  >> sometimes you just want a console window. sure you can pass things to
                  >> the gui version of vim with mvim but what if you really don't want to
                  >> wait for it to start up.
                  >
                  > For what it's worth, you can use `alias vim=/Applications/MacVim.app/
                  > Contents/MacOS/Vim` to use the vim that ships with MacVim in terminal
                  > mode.
                  >
                  > Which of course doesn't mean you'd always want to do it that way :-P
                  >
                  > Nico
                  >
                  > >
                  >

                  --
                  Ted Pavlic <ted@...>

                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_mac" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • Ben Schmidt
                  ... Nobody did, did they? That said, MacVim can run in console mode. I still use console Vim more than any other, but my main console Vim has the GTK2 GUI
                  Message 8 of 16 , Apr 4 4:24 AM
                  • 0 Attachment
                    vivacarlie wrote:
                    > I would resent saying that macports VIM is inferior to mac vim because
                    > sometimes you just want a console window.

                    Nobody did, did they?

                    That said, MacVim can run in console mode.

                    I still use console Vim more than any other, but my main console Vim has the GTK2
                    GUI compiled in, which I use from time to time, and I am using MacVim more and
                    more frequently, too. I think MacVim has the potential to satisfy all my Vim needs
                    at some future stage.

                    Ben.



                    --~--~---------~--~----~------------~-------~--~----~
                    You received this message from the "vim_mac" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                    -~----------~----~----~----~------~----~------~--~---
                  Your message has been successfully submitted and would be delivered to recipients shortly.