- vim has a dependency of libnurses and readline,
sudo apt-get install libncurses5-dev libreadline6-dev
- If you're not using vim 7.4, make sure to set the VIMRUNTIMEDIR variable correctly below (for instance, with vim 7.4a, use /usr/share/vim/vim74a):
cd ~ git clone https://github.com/vim/vim.git cd vim ./configure --with-features=huge \ --enable-multibyte \ --enable-rubyinterp \ --enable-pythoninterp \ --with-python-config-dir=/usr/lib/python2.7/config \ --enable-perlinterp \ --enable-luainterp \ --enable-gui=gtk2 --enable-cscope --prefix=/usr make VIMRUNTIMEDIR=/usr/share/vim/vim74 sudo make install
If you want to be able to easily uninstall the package usecheckinstall
instead ofsudo make install
sudo apt-get install checkinstall cd vim sudo checkinstall
Set vim as your default editor withupdate-alternatives
.sudo update-alternatives --install /usr/bin/editor editor /usr/bin/vim 1 sudo update-alternatives --set editor /usr/bin/vim sudo update-alternatives --install /usr/bin/vi vi /usr/bin/vim 1 sudo update-alternatives --set vi /usr/bin/vim
- Double check that you are in fact running the new Vim binary by looking at the output of
vim --version
.If you don't get gvim working,try changing--enable-gui=gtk2
--enable-gui=gnome2
You may need to add the below option--with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu/
In a Debian-like distribution, Vim's runtime directory(specified byVIMRUNTIMEDIR
) is placed in/usr/share/vim/vim74/
by default. Same thing goes for--prefix=/usr
in theconfigure
call.
However, this VIMRUNTIMEDIR may be different with a Linux distro that is not based on Debian. In such a case, just try to build vim in default directory, and not specifying --prefix=. - gconftool-2 command not found
If you open vim and see above error message, just do sudo apt-get install gconf2
Saturday, December 12, 2015
Install vim with python support
Labels:
Ubuntu
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment