This is a neat trick to know and saves a lot of time:
- Go to the beginning of the line where you want to start copying.
- Make sure you are in the command mode. (Hit ESC).
- Type “ma”. Which means, you are marking the spot with “a”.
- Go to the line till where you want to copy.
- type y
a (yank to mark a). Theis the back tick. - Now go to the place where you want to paste the text.
- type p