Simple way to copy text from vim to system buffer

vim

I am working in windows environment and is using gVim for usual editting. I want a simple way to copy text from vim to system buffer so I can Ctrl+V paste to other windows application.

I tried 'yy' and it didn't work. I hate to select the text by click-and-drag -> Ctrl+C because it make vim enter EDIT mode which I can't do search.

It there simple way to do this? Given that 'yy' only require me to press 2 keys, I want a solution within 2 keys too.

Best Answer

If you want yy to copy into windows clipboard, add the following line to your vimrc

set clipboard=unnamed