On Wed, Oct 10, 2012 at 4:30 PM, Mohammed Chelouti <[email protected]> wrote:
...
> A much more elegant solution would be to have an event to be called when an
> operation is pending. 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)

Mohammed,

What information is available within these events?
Usually this is through some v: scoped variable or something like
<a:file> and so on.

I would expect the usual stuff like:

v:register  - Register currently being operated on
v:operator - Current operator (i.e. "f" for cf)
v:count - Count given for the command

Right now, the YankRing plugin had to create expression maps for these
and prompt the user for the remaining part of the command.  It sounds
like I could use this feature instead of some of those maps, if the
required information is available.

Thanks,
Dave

-- 
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