https://github.com/ckath/vimxclip
clipboard support without the need for +clipboard through xclip, kinda
https://github.com/ckath/vimxclip
clipboard vim vim-plugin xclip
Last synced: 11 months ago
JSON representation
clipboard support without the need for +clipboard through xclip, kinda
- Host: GitHub
- URL: https://github.com/ckath/vimxclip
- Owner: Ckath
- License: mit
- Created: 2018-09-01T15:00:24.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-01T15:02:53.000Z (almost 8 years ago)
- Last Synced: 2025-05-16T05:37:52.298Z (about 1 year ago)
- Topics: clipboard, vim, vim-plugin, xclip
- Language: Vim script
- Size: 1000 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vimxclip
clipboard support without the need for +clipboard through xclip, kinda
- copy text to your system clipboard by yanking into the x register
- automatically synced with system clipboard on focus(if FocusGained works, which it probably won't)
- only depends on xclip, no need for +clipboard in your vim
made solely because I did not feel like installing more packages to get a vim with +clipboard support on Arch Linux
## workarounds
since the focus event probably isn't working and your system clipboard won't be synced to your x register automatically, you might want to make a paste command along the lines of this:
`nnoremap p :call GetClip()"xp`
this sets the x register to whatever is in your system clipboard(xclip -o -selection clipboard) before pasting into vim. you can of course also map `:call GetClip()` to a separate key combo and later paste it through whatever other binds you have, or the default `"xp`.
## notes
- only ever tested in vim
- I personally don't use gvim
- non of the terminal emulators I have tested have had working FocusGained, your mileage may vary