Skip to content

Instantly share code, notes, and snippets.

@shanenoi
Forked from lirenlin/vim.md
Created December 25, 2020 18:44
Show Gist options
  • Save shanenoi/bc71cebbdd964ffa8c851674355c4757 to your computer and use it in GitHub Desktop.
Save shanenoi/bc71cebbdd964ffa8c851674355c4757 to your computer and use it in GitHub Desktop.
build vim with clipboard support

##Install dependency

sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev   libgtk2.0-dev libatk1.0-dev libbonoboui2-dev   libcairo2-dev libx11-dev libxpm-dev libxt-dev

##Configure ./configure --with-features=huge --enable-gui=gnome2 ----enable-pythoninterp=yes

OR

./configure \
    --enable-cscope \
    --with-features=huge \
    --with-x \
    --with-compiledby="Senor QA <senor@qa>"

##Make and check

make -j8
src/vim --version

you will see +clipboard feature enabled

##Install make install

##To make it default You can uninstall the vim in your system first and install your. Alternatively, following the following instructions to make your newly build one default

To make newly installed version “/usr/local/bin/vim” the default one, we’ll use “update-alternatives”.

sudo update-alternatives --install "/usr/bin/vim" "vim" "/usr/local/bin/vim" 1
sudo update-alternatives --install "/usr/bin/vi" "vi" "/usr/local/bin/vim" 1

sudo update-alternatives --config vim
sudo update-alternatives --config vi
sudo update-alternatives --config gvim

ls -lah /usr/bin/vim to check it's a link to your new vim

@shanenoi
Copy link
Author

Recently, i have migrated my workspace to Ubuntu 16. The Version of Vim I installed using apt install vim which does not support for inside terminal and clipboard copying. By the magic way, I found this sheet, thanks to author.

I FOUND OUT MY SOUL !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment