expanding a (g)vim snippet from command line

160 views Asked by At

I have a snippet that expands properly from the vim insert mode:

#In vim insertmode, `prg will expand snippet prg in Ultisnips dir
:execute 'imap `prg prg' . g:UltiSnipsExpandTrigger . '<Esc>gg=G<C-j>'

But I tried to use this is vim's commandline as well:

:execute prg . :UltiSnipsExpandTrigger

(Update: removed imap)

This is giving me error :

E115: Missing quote: '
E15: Invalid Expression: 'imap `prg prg' . g:UltiSnipsExpandTrigger . '

The RHS of the menu mode is the same function that is used in insert mode. Don't know why it is complaining.

Kindly help.

0

There are 0 answers