Vim Copying Issues

I came across an interesting issue today – I opened a file in Vim, and yanked (copied) around 140 lines. Then I opened up another file and pasted those lines – however I only ended up with 49 lines!

This caused me a lot of annoyance, until I finally found the fix – in the Vim configuration file, there was the following lines:

set viminfo='20,\"50    " read/write a .viminfo file, don't store more than
                        " 50 lines of registers

The 50 tells Vim not to store any more than 50 lines of data in the copy buffer. Boost that up to whatever you like, and that solves the limitation. :-)

For reference the system-wide configuration file should be in one of the following locations (depending on your distribution):

/etc/vimrc
/etc/vim/vimrc

Or you can create a local configuration file at:

~/.vim
This entry was posted in Uncategorized and tagged . Bookmark the permalink.