Thursday, February 3, 2011

Re: Performing mapped command on the command line

Reply to message «Performing mapped command on the command line»,
sent 22:48:22 03 February 2011, Thursday
by Marco:

> How can I perform the command from the command line? A
Try
execute "normal i\<Plug>IMAP_JumpBack"
. And what for do you need to invoke it from command line? By the way,
IMAP_Jumpfunc is not in a documented API, so you should not rely on this mapping
being the same for newer version. I sometimes change internal implementation of
my plugin features without notice, but try to keep public API backwards
compatible or at least notify about changes. I believe this is common in
developers world, especially for (relatively) small vim plugins.

Original message:
> Hi,
>
> there is a mapping defined. Relevant :map line is as follows
>
> i <Plug>IMAP_JumpBack <C-R>=IMAP_Jumpfunc('b', 0)<CR>
>
>
> How can I perform the command from the command line? A
>
> :call IMAP_Jumpfunc('b', 0)
>
> performs some action, but it's not the same as pressing <C-R>.
>
>
> Regards
> Marco

No comments: