Did you try 'gv' in normal mode...
It does n't actually select last pasted text...
It selects last selected text..
edit:
nmap p :call Paster()<CR>
nmap '; :call LastPasted()<CR>
nmap y :call ClearList()<CR>
let s:linelist=[]
let s:lastidx=len(s:linelist)
if !exists("*Paster")
function! Paster()
let x=getpos(".")
let s:linelist+=[x]
let s:lastidx=len(s:linelist)
if s:lastidx>50
remove(s:linelist,0)
let s:lastidx-=1
endif
"echo s:linelist
exec "normal! \"0gp"
endfunction
endif
if !exists("*LastPasted")
function! LastPasted()
if s:lastidx>0
let s:lastidx=s:lastidx-1
else
let s:lastidx=len(s:linelist)-1
endif
let pos=s:linelist[s:lastidx-1]
call setpos(".",pos)
endfunction
endif
if !exists("*ClearList")
function! ClearList()
let s:linelist=[getpos(".")]
let s:lastidx=0
exec "normal! :y\<CR>"
endfunction
endif
This might help you.. Add this to your vimrc file.
Here I remapped 'y'(yank) and 'p'(paste) such a way that, the cursor position is saved for every copy and paste. You can use '; to cycle thro the positions. It does not select the pasted text but takes you to the positions where you pasted the text. For every new copy the buffer(a list) is cleared.
I just limited the buffersize to 50. You may remove the section if not needed.
did you see my edit? – asdfg – 2010-04-05T06:35:03.437
@nsharish - no, sorry. saw it just now. – Rook – 2010-04-05T11:01:43.907