TL;DR; version - How do I undo text that was pasted in from my OS copy buffer without undoing other text that was typed in since I went into insert mode?
Longer description:
- Put something in your OS copy buffer (e.g. highlight some text and do
Command-c
on Mac) - Go into insert mode in vim (
i
) - Type something ( e.g.
asdf
) - Without exiting insert mode, paste from your copy buffer into vim (
Command-v
on Mac) - Hit
escape
- Try to undo the paste (
u
)
It undoes everything from the last time you went into insert mode. In otherwords, it clears out asdf
plus all the text I pasted in.
How do I just undo the text that pasted in? Do I have to always go out of insert mode and back in before I paste text just to have the option to undo the pasted text?