I observed a difference in behavior between Vim and Neovim: When pasting
:-prefixed command in normal mode, Vim will enter command mode
whereas Neovim will enter insert mode. More precisely:
- Given the selection buffer contents
:echo "foo"(e. g.
printf ':echo "foo"' |xsel),
- and Vim/Neovim running in a terminal and currently in normal mode,
- then when pasting the selection buffer with middle click or
- Vim will enter command mode and paste the contents there,
- Neovim will enter insert mode at the current cursor position and paste the contents there.
(FWIW I have
set mouse= in both, but as stated above the behavior
is the same using the keyboard. Both Vim and Neovim are in
I strongly prefer the Vim behavior as there’s more convenient ways of pasting into the buffer. Is there a way to make Neovim behave the same as Vim when pasting?