Jimmy Mack wrote:
I really like the "gv" command, which starts visual
mode and automatically selects the previous selection,
regardless of where the cursor happens to be.
I would like to see a similar command that starts
visual mode and selects the block of text I have just
pasted in.
After extensive browsing through the help system and
online, I can't find a way to do this.
My vim scripting skills are weak, can anyone tell me
if this is possible to script a command for? I'm not
sure if vim retains information about the boundaries
of the most recently pasted text.
Try
`[v`]
or
'[V']
or
`[^V`]
(where ^V means "hit Ctrl-V, unless that is your paste key, in which case you
should hit Ctrl-Q) depending on whether you want a characterwise, linewise or
blockwise highlight.
Best regards,
Tony.