avatar

ShīnChvën ✨

Effective Accelerationism

Powered by Druid

Vim Copy to Clipboard on Ubuntu

Sun Aug 08 2021

Check Vim Version

Check if register is available for your version of vim:

vim --version | grep clipboard
  • +clipboard - means it is available, skip next step.
  • -clipboard - means it is not available.

Install a Vim that Supports Register on Ubuntu

sudo apt purge vim       # remove default vim
sudo apt install vim-gtk # install the vim with extra functions

Copy to Clipboard

  • Enter select mode by press v.
  • Use h+j+k+l to select content
  • Press "+++y to copy selected content to system clipboard.