If you want the most up-to-date version of Vim, you can download the source files and compile it on your computer. This ensures you have the latest version of Vim.
Building Vim from source is not hard. And if you need a certain patch for vim, it's actually easier to compile from scource than to patch your current Vim version provided by your package manager.
First you'll want to remove Vim if you have it installed on your system (and havn't build your current version from source, in which case you can just update it as explained below). Remove Vim by running
If you have the following packages also installed, remove them too
Programs often need routines, such as input/output for example, which are stored in shared libraries. If a program requires a shared resource, we say it has a dependency. To satisfy the build dependencies for the Vim source package, we run
Possibly you need to run this with administrative privileges (i.e. use sudo).
By convention, we'll first create a directory for our source code named
src and then download the source code into it with Mercurial
Change to the directory with the vim source files and run
to build the program
This will produce a lot of messages and can take a while depending, among other factors, on the performance of your processor.
Well-packaged source code often includes a special
install. This target will install the compiled program in a
system directory for use. This directory is usually
the default location for locally built software. Run the following to finish the
installation of Vim
We can check if the program is ready to use
From now on, if you want to get new patches, you simply need to check for any changes to the vim source by changing to the directory with the Vim source code and running
Finish again by running
I used this method to make use of the breakindent patch, as mentioned here. In short, this enables proper line wrapping by also taking the indentation of the line into account. My current Vim version was 7.4 and only included patches 1-52 while the breakindent patch was introduced in patch 7.4.338. After compiling from source, I'm currently running Vim v7-4-801 which was released july 28 this year (one month ago).