ā¦or, I suppose, other Linux-esā¦Linuxiā¦Linux distributions.
Many of the Vim features on which Iāve come to depend simply arenāt available in Vim pre-7.3.3. Thatās fine if Iām working on an OS that cares about having up-to-date software like Ubuntu or OSX; however, it aināt so great if Iām working on a shared host that uses CentOS five point something dumb because the hosting-providers werenāt hugged as children (Iād guess).
editā10/01/2013
For installing on Ubuntu and additional source install tips see this little post on the YouCompleteMe wiki
New OS, Old Repo
The only thing worse than working on an old OS, with an old version of Vim is working on a new OS with an old version of Vim. I recently disovered that the yum-installable Vim (vim-enhanced) version on CentOS 6.3 is v.7.2.411āWTF CentOS? Whatās your deal, guy?
Some plugins that depend on version 7.3:
- ĀTagbar
- ĀNumbers.vim
- ĀYouCompleteMe
And, really, those are just the plugins that fail loudly for me. Like the ones that vomit, āHey, WTF, guy?ā to stdout every rootinā tootinā time I fire up Vim. There would likely be other functionality that Iād loose by not using Vim 7.3.3+.
I donāt have to take this kind of guff from CentOS. No. I think that, instead, Iām going to do something awesome.
Compiling Vim from source means you donāt have to get pushed around by crummy distro repos and you look like a 1970s-era Fred Williams-level badassā¦soā¦bonus pointsā¦
Retrieving Vim source
Vim keeps its source in a Mercurial repo on googlcode so you need to
download it. To do that you should have Mercurial installed (which you
can, somewhat ironically, install from via yum yum install
mercurial
). You should switch to the root user for this install
and for your sanity so use su
or sudo
bash
:
$ sudo bash
$ cd /usr/local/src/
$ hg clone https://vim.googlecode.com/hg/ vim
$ cd vim
Configuration options
There are quite a few configuration options (which you can view by
running ./configure āhelp
in your newly created
vim
directory)āwith respect to Vim installs I support going
nuclear. Even at itās most ginormous Vim will still be a small install
relative to other IDEsāVim is my primary editor and IDE, so Iām down to
do it big. Iām also going to use the /usr
prefix so that
Vim is installed system-wide.
$ ./configure --prefix=/usr --with-compiledby="Tyler the Compiler" --with-features=huge --enable-rubyinterp --enable-pythoninterp
make && make install
Srsly, thatās itā
make && make install
Congrats! Youāre one bad mother Vim compiler.
So⦠which vim
? /usr/bin/vim
. Boom. Yeah,
thatās right.