On 25 ноя, 13:28, "Marczis, Peter (NSN - HU/Budapest)"
<[email protected]> wrote:
> Hi,
> what should be the good syntax in this case ?
>
> for item in sacks
> menu ]environments.{item} echo "coool"
> endfor
>
> sacks is a list. and I would like to create a menu from this list...
> but, how can I use the item variable to create the menu ?
let items = ['hello', 'vim', 'world']
for item in items
exe 'menu environments.'.item.' :echo "'.item.'"<CR>'
endfor
to get help on 'exe':
:h :execute
> thanks for all your trouble !
>
> Br,
> Peter.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---