Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 572 Bytes

README.md

File metadata and controls

26 lines (17 loc) · 572 Bytes

OSC52.vim for Vim and Neovim

This script can be used to send an arbitrary string to the terminal clipboard using the OSC 52 escape sequence, as specified in http://invisible-island.net/xterm/ctlseqs/ctlseqs.html, section "Operating System Controls", Ps => 52.

Install

vim-plug

Plug 'kuntau/vim-osc52'

Mapping

Edit your .vimrc to include this code

vmap <C-c> <Plug>(YankOSC52)

This will map Ctrl+C to copy. You can now select text in vim using the visual mark mode or the mouse, and press Ctrl+C to copy it to the clipboard.