Hi Nathan!

On Mo, 30 Nov 2009, Nathan Neff wrote:

> I see that there's a "-register" option that I can use when defining
> a custom command, but I'm having trouble understanding how to use it.
> 
> For example, I just want to create a command that prints out the contents of
> a register that is specified by the user.
> 
> I tried something like this, but can't print out the <reg> part:
> 
> :command! -register Foo :echo You picked this register: <reg>
> 
> What am I doing wrong?

You need to expand <reg>, e.g. com! -register Foo :echo expand("<reg>")

regards,
Christian
-- 
Math problems?  Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x].

-- 
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Reply via email to