vim Useful configurations that can be put in .vimrc Configure the default register to be used as system clipboard


set clipboard=unnamed

This makes it possible to copy/paste between Vim and the system clipboard without specifying any special register.

yy yanks the current line into the system clipboard

p pastes the content of the system clipboard into Vim

This only works if your Vim installation has clipboard support. Run the following command in the terminal to check if the clipboard option is available: vim --version | grep clipboard