--
Regards,
Aarto
On Mon, Aug 31, 2009 at 10:00 PM, Gary Johnson wrote:
Just use this:
On 2009-08-31, Aarto Matti wrote:
> Hello,
>
> How to print an expanded variable into vim command line? For some
> reason I would like to map e.g. F12 to complete edit command with vim
> user files path. I would do something like:
>
> :map <F12> :edit expand($VIM)
>
> What it prints is
>
> :edit expand($VIM)
>
> and I want
>
> :edit /usr/share/vim
:map <F12> :edit $VIM
If you want to actually edit $VIM and not add more to the path
before executing that command, use this:
:map <F12> :edit $VIM<CR>
Regards,
Gary
On Mon, Aug 31, 2009 at 9:28 PM, Tim Chase wrote:
Several ways:
:map <f12> :edit <c-r>=expand($VIM)<cr><cr>
:map <f12> :exec "edit ".expand($VIM)<cr>
-tim
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment