Solarian Programmer

My programming ramblings

Raspberry Pi Raspbian - Building and Installing Vim 8.0

Posted on September 24, 2016 by Paul

About two weeks ago Vim 8 was released with some notable changes. While I’m not a Vim fanatic, I tend to use it for quick edits on my Raspberry Pi over the network. Currently, Raspbian Jessie comes with the venerable Vim 7.4 and it will be a while until this will be replaced with version 8.

Fortunately, compiling Vim from sources on Raspbian is pretty straightforward.

Start by installing Ncurses with:

1 cd ~
2 sudo apt-get install ncurses-dev

Once the above is finished, we can clone the Vim Github respository with:

1 git clone https://github.com/vim/vim.git vim-master
2 cd vim-master

If you don’t have git installed, you can use wget:

1 wget https://github.com/vim/vim/archive/master.zip
2 unzip master.zip
3 cd vim-master

Finally, let’s build and install Vim 8:

1 cd src
2 ./configure
3 make -j 4
4 sudo make install

As an added bonus, for beginners, Vim 8 comes with some nice defaults like syntax highlighting and indentation which in the past where disabled by default.

Here is an example of how it looks with a C++14 source file:

Vim 8 with a C++14 file

If you want to learn more about Vim I would recommend reading Practical Vim by Drew Neil:


Show Comments