RE: Capture registers in maps
>What about doing the following?
> I think I forgot to mention.
> Want I want to do is this:
> Which will yank 5 lines, the command is not preceeded by a :.
> So how do you define a function/command that will accept the count?
function! TestCmd(count, register)
echomsg "Count = " . a:count
echomsg "register = " . a:register
nnoremap yy :<C-U>call TestCmd(v:count, v:register)<CR>
BTW, you should checkout the Yank() function in the foo.vim
Vim plugin (What happened to Benji Fisher?)