New features in Neovim 0.5
New features in Neovim 0.5
Posted Aug 5, 2021 21:25 UTC (Thu) by karkhaz (subscriber, #99844)In reply to: New features in Neovim 0.5 by Ranguvar
Parent article: New features in Neovim 0.5
For example, on Arch, the vim package does not depend on Xorg or Wayland, while the gvim package transitively does. This means that gvim's vim binary integrates with the system clipboard, while regular vim does not.
If your vim can't talk to the clipboard, you have to copy text by selecting it with the mouse and middle-clicking elsewhere, which is probably not what you want if you prefer using the terminal. With X11 support, you can copy the visual selection onto the clipboard with Ctrl-C, and paste from the system clipboard with Ctrl-D, as follows:
nnoremap <C-d> :set paste<Return>"+p:set nopaste<Return><Esc>a
inoremap <C-d> <Esc>:set paste<Return>"+p:set nopaste<Return>a
vnoremap <C-c> "+y<Esc>
You could even remap the usual yank and put commands to copy and paste to the system clipboard, though I personally like the vim clipboard be separate from the system one.
Of course, you don't need to install gvim for all this if you just want clipboard support; an alternative would be to just compile vim with the right flags, and then you don't need to drag in gtk3 and other various libraries.
