I know that gv reselects the last visual selection. This is great and I use it frequently.
But sometimes I want to select the block of text that I just pasted. This is useful e.g. for sending example code from Stackexchange from vim to a REPL or generally selecting text that I just pasted from one tab to another or from outside vim to inside, etc.
NOTE: I am asking this question just to provide the right place to put the answer to a related question to Is there a way to reselect the last visual shape, rather than the last actual selection, starting at the current cursor position?