How to (safely) swap the contents of two files opened in (neo)vim buffers
Mahmoud Al-Qudsi
Raise your hand if you’ve been here before: you have file1 open in a vim or neovim buffer and you want to “fork” its contents over to file2, but you need to reference file1 while you do so. So you do the obvious: you open a split buffer with :sp or :vsp, run a quick :saveas file2 then hack away at...