fauxClip
fauxClip is a Vim plugin to provide a pseudo clipboard support for versions of Vim compiled without +clipboard
fauxClip uses
xclip
(orxsel
as fallback)pbcopy
/pbpaste
clip.exe
/powershell.exe Get-Clipboard
wl-copy
/wl-paste
as default copy and paste command, but you can override either of these if you have more specific needs.
(The following examples utilize defaults for Linux)
- Copy:
let g:fauxClip_copy_cmd = 'xclip -f -i -selection clipboard'
let g:fauxClip_copy_primary_cmd = 'xclip -f -i'
- Paste:
let g:fauxClip_paste_cmd = 'xclip -o -selection clipboard'
let g:fauxClip_paste_primary_cmd = 'xclip -o'
If you for some reasons don't want to suppress error messages from clipboard
command (e.g. xclip
's empty clipboard), then:
let g:fauxClip_suppress_errors = 0
If Vim is compiled with +clipboard, but you want to use this plugin regardless, then:
let g:fauxClip_always_use = 1
Installation
minPlug:
MinPlug Jorengarenar/fauxClip
vim-plug:
Plug 'Jorengarenar/fauxClip'
Vim's packages
cd ~/.vim/pack/plugins/start
git clone git://github.com/Jorengarenar/fauxClip.git
Single file
curl --create-dirs -L https://raw.githubusercontent.com/Jorengarenar/fauxClip/master/plugin/fauxClip.vim -o ~/.vim/plugin/fauxClip.vim