DEV Community

Ko Takagi
Ko Takagi

Posted on

How to install Vim on XSERVER

XSERVER is one of the most popular hosting service in Japan.

It is possible to connect to the server via ssh, but Vim is not installed.

I often work with Vim on the server, so I installed Vim using the following steps:

Step1: Install ncurses

mkdir ~/opt && cd $_
wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.1.tar.gz
tar zxfv ncurses-6.1.tar.gz
cd ncurses-6.1
./configure --prefix=$HOME/local
make
make install
Enter fullscreen mode Exit fullscreen mode

Step2: Install Vim

cd ~/opt
git clone https://github.com/vim/vim.git
cd vim
./configure --with-features=huge --enable-fail-if-missing --prefix=$HOME/local --with-local-dir=$HOME/local
make
make install
Enter fullscreen mode Exit fullscreen mode

Step3: Setting environment

vi ~/.bashrc

# Add alias to .bashrc
export PATH=$PATH:$HOME/local/bin
alias vi='vim'
Enter fullscreen mode Exit fullscreen mode

Reload .bashrc

source ~/.bashrc
Enter fullscreen mode Exit fullscreen mode

Now you can use the vim command.

Have a great day👍

Latest comments (0)