vim-gnupg
vim-gnupg copied to clipboard
Encrypt to clipboard
A command to encrypt the current buffer to the clipboard would be really helpful
Can you clarify what functionality you're asking for? Do you simply want Vim to copy the contents of the already encrypted file on disk into the clipboard?
Ideally, I'd like to be able to edit a buffer, copy the encrypted version to the clipboard without writing a file. Currently using xsel; rm for the task. On Feb 18, 2014 12:07 PM, "James McCoy" [email protected] wrote:
Can you clarify what functionality you're asking for? Do you simply want Vim to copy the contents of the already encrypted file on disk into the clipboard?
— Reply to this email directly or view it on GitHubhttps://github.com/jamessan/vim-gnupg/issues/15#issuecomment-35427337 .
You could do this with :w !gpg --armor --encrypt --output - | xsel.
I'll think about adding a :GPGArmor command or some such to turn the buffer (or create a new buffer) into an encrypted/armored version of itself. Then you could either use Vim's own mechanisms to interact with the clipboard or feed it to xsel.