This only works on Mac OSX:
Some time we need not only to yank inside vim, also can yank to clipboard, that’s very easy, you just need map some key your .vimrc:
.vimrc
vmap <Somekey> :w !pbcopy<CR><CR>