ojroques / vim-oscyank

A Vim plugin to copy text through SSH with OSC52
BSD 2-Clause "Simplified" License
631 stars 39 forks source link

Clarification/Enhancement #1

Closed matthewbahr closed 4 years ago

matthewbahr commented 4 years ago

Just a suggestion:

You could add this to your readme as an example of how to automatically perform a OSC52 yank whenever you yank text with y:

augroup YankOSC52
    autocmd!
    autocmd TextYankPost * if v:event.operator ==# 'y' | :call YankOSC52(getreg('"')) | endif
augroup END
ojroques commented 4 years ago

Good suggestion thanks! I've extended it a bit so that the command is not executed when we yank to another register.