Monday, August 20, 2012

defining imap that calls performs second call if cursor didn't move

Hi,

Suppose I have two functions Func1 and Func2. I would like to know if it is possible to define a imap that first calls Func1
(imap <f1> <c-r>:call Func1()<CR>)
if the cursor moves as a result of this call then we are done, otherwise it would call Func2 after calling Func1.

Thank you.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: