OSC 52 is a terminal sequence used to copy printed text into clipboard. It is useful in some environments, or when SSH'ing into some server and you need to copy back output from there into your local clipboard.
Your terminal must support OSC 52, of course (e.g. mintty does).
Tmux is supported.
Use your favorite method:
- Pathogen - git clone https://github.com/fcpg/vim-osc52 ~/.vim/bundle/vim-osc52
- NeoBundle - NeoBundle 'fcpg/vim-osc52'
- Vundle - Plugin 'fcpg/vim-osc52'
- manual - copy all of the files into your ~/.vim directory
Copy to system clipboard:
vmap <C-c> y:Oscyank<cr>
xmap <F7> y:Oscyank<cr>
Code from Chromium, tweaked for personal use.
Check original code on Chromium.