On 8/3/06, Noah Spurrier <[EMAIL PROTECTED]> wrote:
Is it possible to Yank Append directly to the unnamed register? That is, without affecting any of the other named registers. I know that the unnamed register also holds the same text as was last yanked to a named register, but I wanted to Yank Append without affecting any of those.
Yes, it must be possible using example of code like that described in :help g@ Here is skeleton (untested and unfinished): :nmap <silent> <f5> :set opfunc=AppendUnnamedReg<cr>g@ :vmap <silent> <f5> :<C-U>call AppendUnnamedReg(visualmode(), 1)<CR> function! AppendUnnamedReg(type,...) let old=@" " old contents of unnamed register ... code to yank the selection depending on the mode ... ... into unnamed register ... let @" = old . @" " append to unnamed register endfun Yakov