Q:

How to copy a selected word to the clipboard using VIM?

I would like to copy a selected word that the cursor is on to the clipboard. Is there a way to do this.

A:

If support for clipboard is built into your Vim, clipboard is mapped to register *, so you use it the same as any other register. So, for example, to copy the word under cursor to clipboard you do "*yiw. To copy current line "*yy. To paste from clipboard "*p

