Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'd like to run the latest version of vim from the console (and not as a separate app).

How do I update it?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

There are many ways to do that:

  • install Vim from the sources found at www.vim.org
  • install Vim via MacPorts
  • use the CLI vim that comes with the latest MacVim build

If you go with the two first solutions, you need to do two things afterwards:

  1. make sure the folder containing your new shiny Vim is in your $PATH

  2. add an alias to your custom vim in ~/.profile and set the $EDITOR environment variable if needed

    alias vim='/path/to/custom/vim/folder/vim'
    EDITOR=/path/to/custom/vim/folder/vim
    

    If you use Git or Subversion or another tool that uses Vim as an editor you might need do some more configuration, too.

All my past attempts to build Vim from sources or via MacPorts while matching MacVim's features have resulted in slow and oversized memory hogs (think 10 seconds startup).

The best solution for me is to just use MacVim's CLI binary which is located in MacVim's bundle:

EDITOR=/Users/romainl/Applications/MacVim.app/Contents/MacOS/Vim
alias vim='/Users/romainl/Applications/MacVim.app/Contents/MacOS/Vim'

Which gives you a very modern, feature-packed and speedy Vim.

share|improve this answer

I'd suggest you install it through Homebrew to easily keep it up to date. Light weight MacPorts. http://mxcl.github.com/homebrew/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.