I'm on Ubuntu 12.04 and want to know how to update Vim via the command line. What is the command to update this?
$ git clone https://github.com/vim/vim.git $ cd vim/src $ make $ sudo make install
You can also use
apt-get update && apt-get install vim to update Vim to the latest version available in your distribution's packages registry. To update all available packages, you can run
apt-get update && apt-get upgrade
However, you may not get the latest version of Vim with APT (you'll moszt likely the latest major version, but not the minor / patch versions).
the best answer to this question is https://vi.stackexchange.com/a/10827/32151
and according to the linked answer, another way to doing this is using Personal Packet Archive (PPA)
add this PPA
sudo add-apt-repository ppa:jonathonf/vim
Update the package lists:
sudo apt update
sudo apt install vim
If you are working on Ubuntu16/CentOS7, you can use below commands to install latest vim.
sudo apt-get install gcc git ncurses-dev git clone --depth=1 https://github.com/vim/vim.git cd vim/src sudo make sudo make install
change first command to:
sudo yum install gcc git ncurses-devel
Logout and login if you are still seeing older version.