If I go to this web page on my MacOS, hit Command+A to highlight all the text, Command+C to copy it, open vim, enter insert mode, and paste with Command+V, it looks like:
If I do exactly the same thing, but before pasting, I enter paste mode (
:set paste), then enter insert mode, and paste, I get this:
At first I thought it was something in my .vimrc, so I commented out EVERYTHING in my .vimrc file, and it still happens. The screenshots are with a blank .vimrc file.
What's going on? Why is a mode specifically designed for pasting doing a worse job than regular mode?
Update: Upon further investigation, I realized that this only happens in neovim. vim works fine in both regular, and paste mode.
Update 2: On my MacOS, this seems to only happen when I'm SSHed into a Linux system using the MacOS Terminal app, where neovim is running. If I use the neovim that's on my MacOS (also with the Terminal app), it doesn't happen.