So I\'ve discovered that a common task for me in Vim is to PUT either to the start of the line or the end of the line. So my mapping could be:
nmap
This is perfectly possible. I first I though this solution was possible: https://stackoverflow.com/a/290723/15934, but won't let us move the cursor as we wish, and normal can't be used.
Still, we can do this:
function! s:PutAt(where)
" appends, but does not insert, hence the hack
" with getline to build a list of what should be at the start of the buffer.
let line = a:where ==1
\ ? [getreg(), getline(1)]
\ : getreg()
call setline(a:where, line)
endfunction
nnoremap P :call PutAt(1)
nnoremap p :call PutAt(line('$')+1)