I observed a difference in behavior between Vim and Neovim: When pasting
a :
-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
<S-Insert>
- 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 nopaste
state.)
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?
bracketed_paste
(which isn't the one responsible for pasting from the outside, btw); nvim hashandle_bracketed_paste
.echo ':echo "foo"' | pbcopy
,vim
, Cmd-V leaves me with the command and a blank line in the buffer and in Normal mode. (This sounds closer to your NeoVim behavior, and may or may not have been affected by bracketed paste.)