I am using Putty on Windows to connect to a Linux server.
On the Linux server I am using Vim to edit code files.
I am using my mouse to select an area to copy and then right click to paste the copied code.
So far I am aware of 2 settings that alter this copy/paste behavior:
- :set paste
- :set autoindent
Sample YAML file:
a1: value1 a2: value2 a3: a4: value4 a5: a6: value6 a7: - value7 b1: value1 b2: value2 b3: b4: value4 b5: b6: value6 b7: - value7
What I want to do:
Copy the whole "a" code sample under b3: in the "b" code sample while keeping the original indentation.
b1: value1 b2: value2 b3: b4: value4 a1: value1 a2: value2 a3: a4: value4 a5: a6: value6 a7: - value7 b5: b6: value6 b7: - value7
All combinations (paste, autoindent), (paste, noautoindent), (nopaste, autoindent), (nopaste, noautoindent) are incapable of performing pastes correctly. They all mess up the indentation in 1 way or another.
Is there any solution to this issue without using yank/p to copy/paste. Using a mouse is so much better in my opinion when you are not on a serial console.