Check Vim Version

Check if register is available for your version of vim:

1
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

1
2
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.