A short post showing how to install vim for local user. For my own record
Why do I need to install
vim for local user?
ssh to other servers to develop code. The server is shared with many other people. If you update the
sudo, other people’s
.vimrc may encounter problems. So we install our own version, and keep the environment clean.
Basically I follow this website: Is it possible to install vim for a user? - StackOverflow.
vim. Currently the version is 8.1 (the machine version is 7.2).
1 2 git clone https://github.com/vim/vim.git cd vim/src
- Change the “prefix” in
ncurses-develif you haven’t done so. This actually requires
sudopermission. Note: the package name varies with the OS distribution, please check this.
- In the
- If no error occurs, run
- You will see
- Add the alias in your
1 alias vim="$HOME/.local/bin/vim"
Note: I tried to add
$PATH but failed. The
vim is still the old version. The alias works for me.
Now there is no “Unknown option: relativenumber” error showing up when I open