Monday, July 02, 2012

How to Copy/Paste from the Clipboard in vim

On Ubuntu 11.04, accessing the clipboard from vim is disabled by default, this is how to enable it:
Download the package source:
apt-get source vim
Edit vim/debian/rules
TINYFLAGS:=--with-features=normal
TINYFLAGS+=--enable-gui
Build and install the package:
dpkg-buildpackage
dpkg -i vim*.deb
Now you can copy and paste using:
"+y to copy to clipboard
"+p to paste from clipboard

No comments:

Post a Comment