|
|
Log in / Subscribe / Register

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

On some distros, the 'gvim' package also provides a vim binary that is compiled with more options than the more minimal vim package. So you can continue running terminal vim, but with more features.

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.


to post comments

New features in Neovim 0.5

Posted Aug 5, 2021 22:15 UTC (Thu) by mathstuf (subscriber, #69389) [Link]

On Fedora, there is `vim-enhanced` which has these things enabled (though I haven't used them myself as I'm content with selecting and middle click pasting).

New features in Neovim 0.5

Posted Aug 6, 2021 3:18 UTC (Fri) by jamessan (subscriber, #12612) [Link]

On some distros, the 'gvim' package also provides a vim binary that is compiled with more options than the more minimal vim package. So you can continue running terminal vim, but with more features.
None of that is needed with Neovim, since all features are always built in.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds