Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I cancel a paste operation in Vim?

Tags:

vim

I had rather a lot of text on my clipboard whenever I accidentally right clicked inside Putty (with Vim open), and Vim has initiated a paste operation which has been going for around ten minutes now.

I don't want to lose my unsaved work, is there a way to instruct Vim to stop pasting text?

like image 286
JMK Avatar asked Jun 18 '13 19:06

JMK


1 Answers

If you're in normal mode, Ctrl-C aborts the current command in progress. Then press u to undo anything that changed before you stopped it.

like image 161
Michael Kristofik Avatar answered Sep 25 '22 01:09

Michael Kristofik