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

is there a way of getting macvim as the default terminal Vim?

Expand Messages
  • Federico Calboli
    Hi All, I want the Vim version shipped with MacVim to be the new default in terminal (as opposed to the Apple standard version). My understanding is that
    Message 1 of 6 , Feb 6 4:21 AM
    • 0 Attachment
      Hi All,

      I want the Vim version shipped with MacVim to be the new default in terminal (as opposed to the Apple standard version). My understanding is that doing something like

      sudo mv /usr/bin/vim /usr/bin/vim-apple
      sudo ln -s /Applications/MacVim.app/Contents/MacOS/Vim /usr/bin/vim

      is not encouraged -- though I might well be wrong.

      In any case, when I type 'vim' in a terminal I want /Applications/MacVim.app/Contents/MacOS/Vim this, not the Apple one. How do I do that?

      BW

      F

      --
      --
      You received this message from the "vim_mac" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_mac" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Andrew Stewart
      ... [snip] ... Assuming mvim (included in the MacVim download) is on your path: alias vim= mvim -v Also I do this: export
      Message 2 of 6 , Feb 6 4:33 AM
      • 0 Attachment
        On 6 Feb 2014, at 13:21, Federico Calboli <f.calboli@...> wrote:
        > I want the Vim version shipped with MacVim to be the new default in terminal (as opposed to the Apple standard version).
        [snip]
        > In any case, when I type 'vim' in a terminal I want /Applications/MacVim.app/Contents/MacOS/Vim this, not the Apple one. How do I do that?


        Assuming mvim (included in the MacVim download) is on your path:

        alias vim='mvim -v'

        Also I do this:

        export EDITOR='/Applications/MacVim.app/Contents/MacOS/Vim'

        Yours,
        Andrew Stewart

        --
        --
        You received this message from the "vim_mac" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_mac" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Federico Calboli
        ... Thank. I presume both are to be put in my ~/.bashrc? Incidentally, why is a brutal symlink a bad way of doing this? BW F
        Message 3 of 6 , Feb 6 4:38 AM
        • 0 Attachment
          On 6 Feb 2014, at 12:33, Andrew Stewart <boss@...> wrote:

          > On 6 Feb 2014, at 13:21, Federico Calboli <f.calboli@...> wrote:
          >> I want the Vim version shipped with MacVim to be the new default in terminal (as opposed to the Apple standard version).
          > [snip]
          >> In any case, when I type 'vim' in a terminal I want /Applications/MacVim.app/Contents/MacOS/Vim this, not the Apple one. How do I do that?
          >
          >
          > Assuming mvim (included in the MacVim download) is on your path:
          >
          > alias vim='mvim -v'
          >
          > Also I do this:
          >
          > export EDITOR='/Applications/MacVim.app/Contents/MacOS/Vim'

          Thank. I presume both are to be put in my ~/.bashrc? Incidentally, why is a brutal symlink a bad way of doing this?

          BW

          F
        • David Henderson
          ... I don t think that it s the symlink that s considered bad form. It s altering /usr/bin. /usr/bin can and will get blasted by any Apple updates. If you want
          Message 4 of 6 , Feb 6 5:07 AM
          • 0 Attachment
            On 06 Feb 2014, at 04:38, Federico Calboli wrote:

            >
            > Thank. I presume both are to be put in my ~/.bashrc? Incidentally, why is a brutal symlink a bad way of doing this?
            >
            I don't think that it's the symlink that's considered bad form. It's altering /usr/bin. /usr/bin can and will get blasted by any Apple updates. If you want to go the symlink route then use /usr/local/bin and put it in your $PATH such that it loads before /usr/bin. That's the correct way to override the system /usr/bin.

            David P Henderson
            --
            "Never attribute to malice that which can be adequately explained by stupidity."
            -- Robert J. Hanlon

            --
            --
            You received this message from the "vim_mac" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php

            ---
            You received this message because you are subscribed to the Google Groups "vim_mac" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • Adam Horner
            ... 2 reasons: * Any time Apple does an update with a new version of vim, your changes will be overwritten and you may not notice * AppleÆs own builtin (and
            Message 5 of 6 , Feb 6 5:09 AM
            • 0 Attachment

              I want the Vim version shipped with MacVim to be the new default in terminal (as opposed to the Apple standard version).
              [snip]
              In any case, when I type 'vim' in a terminal I want /Applications/MacVim.app/Contents/MacOS/Vim this, not the Apple one.  How do I do that?

              Assuming mvim (included in the MacVim download) is on your path:

                alias vim='mvim -v'

              Also I do this:

                export EDITOR='/Applications/MacVim.app/Contents/MacOS/Vim'

              Thank.  I presume both are to be put in my ~/.bashrc?  Incidentally, why is a brutal symlink a bad way of doing this?


              2 reasons:

              * Any time Apple does an update with a new version of vim, your changes will be overwritten and you may not notice
              * Apple’s own builtin (and some 3rd party scripts) sometimes rely on exact versions and exact layout of files as delivered by Apple, so overriding via settings is preferably to overwriting files. Any time you think of doing ’sudo …’, try and think of another way of doing it first

              Yes, your ~/.bashrc or ~/.bash_profile are appropriate places to put these. By convention, you would put an alias command in your bashrc and export a variable from your ~/.bash_profile (you can look up the difference between login shells and interactive shells with man bash if you are curious as to why).

              As for my part, I have a folder named ~/.bin in which I put my shell executable files, like mvim, and then in my .bash_profile I have ‘export PATH=~/.bin:${PATH}’, along with a few aliases in my .bashrc (vim, view, gvim, gview, vimdiff, gvimdiff etc). I use ~/.bin so that it is a hidden folder as far as the Finder is concerned, but many folks just call it ~/bin

              Hope that helps,
              Adam.



            • Tim Johnson
              ... Looks like you re getting some good help on your question. I wanted to add that I use midnight command (compliments of macports (in my case) or homebrew).
              Message 6 of 6 , Feb 7 11:32 AM
              • 0 Attachment
                * Federico Calboli <f.calboli@...> [140206 03:31]:
                > Hi All,
                >
                > I want the Vim version shipped with MacVim to be the new default in terminal (as opposed to the Apple standard version). My understanding is that doing something like
                >
                > sudo mv /usr/bin/vim /usr/bin/vim-apple
                > sudo ln -s /Applications/MacVim.app/Contents/MacOS/Vim /usr/bin/vim
                >
                > is not encouraged -- though I might well be wrong.
                >
                > In any case, when I type 'vim' in a terminal I want /Applications/MacVim.app/Contents/MacOS/Vim this, not the Apple one. How do I do that?
                Looks like you're getting some good help on your question.
                I wanted to add that I use midnight command (compliments of
                macports (in my case) or homebrew). I have set vim as my default
                edit for MC.
                Here's some tips on that, if you are interested:
                http://www.cyberciti.biz/tips/midnightcommander-set-vi-as-default-editor-viewer.html
                --
                Tim
                tim at tee jay forty nine dot com or akwebsoft dot com
                http://www.akwebsoft.com, http://www.tj49.com

                --
                --
                You received this message from the "vim_mac" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php

                ---
                You received this message because you are subscribed to the Google Groups "vim_mac" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
                For more options, visit https://groups.google.com/groups/opt_out.
              Your message has been successfully submitted and would be delivered to recipients shortly.