On Wednesday 10 October 2012 14:16:15 Ben Fritz wrote:
> On Wednesday, October 10, 2012 3:30:13 PM UTC-5, Mohammed Chelouti wrote:
> > I've looked at the Vim code and added the following three autocommands:
> > 
> > - OperationPending: is executed when an operation is called which needs a
> > motion. - OperationExecuted: is executed after the pending operation was
> > executed (i.e. a motion or a second keystroke like yy, dd etc. is
> > passed). - OperationCleared: is executed after every command that doesn't
> > enter operation-pending-mode. (executed after OperationExecuted)
> I can see why the first two are needed for taking actions in operator
> pending mode. But why is the third needed?

Because a pending operation triggers OperationExecuted only when the operation 
is really executed.
E.g. place your cursor on the first line and hit dk. This will leave operation 
pending mode but won't execute the operation. Additionally actions like 
hitting <Esc> or <C-c> or just leaving the buffer won't execute the operation, 
either.

-- 
You received this message from the "vim_dev" 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

Raspunde prin e-mail lui