https://stackoverflow.com/questions/18258561/pasting-a-huge-amount-of-text-into-vim-is-slow/79633075
I recently ran into this. I didn't realize that the swpfile slowed down pastes.
I was trying to paste 50kb of text in Vim, but it kept getting stuck and I had to kill -9 it.
kill -9
But, then I ran :set noswapfile and the paste was instant! TIL!
:set noswapfile
Just a habit, because you can run any command and get the stdout into vim in that method. Like for getting your shebang or an ls listing.
Then for the casual reader: don't pick this habit up. There's no reason to fork/exec a shell, invoke cat for the purpose of printing to stdout, then move the data into your buffer. You can just do :r somefile.txt.
:r somefile.txt
For Vim enthusiasts and anyone interested in Vim/Neovim!
"VIM is the greatest editor since the stone chisel." - Dr. Jose Unpingco
#HJKL
Just a habit, because you can run any command and get the stdout into vim in that method. Like for getting your shebang or an ls listing.
Then for the casual reader: don't pick this habit up. There's no reason to fork/exec a shell, invoke cat for the purpose of printing to stdout, then move the data into your buffer. You can just do
:r somefile.txt.