[vim/vim] Autocommand event that runs after a command executed? (Issue #12046)

16 views
Skip to first unread message

Sebastian Carlos

unread,
Feb 22, 2023, 5:47:38 AM2/22/23
to vim/vim, Subscribed

Is it possible to have an autocommand event that runs whenever a command executes on vim? By "command" I mean anything like w, di( or ihello<ESC>.

Alternatively, can a user, plugin, or remote process figure out programatically when such a command is executed on Vim? Could this information get logged somewhere?

Thanks for your time! You people rock and you know it, props.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12046@github.com>

Bram Moolenaar

unread,
Feb 22, 2023, 8:16:05 AM2/22/23
to vim/vim, Subscribed


> Is it possible to have an autocommand event that runs whenever a
> command executes on vim? By "command" I mean anything like `w`, `di(`

> or `ihello<ESC>`.
>
> Alternatively, can a user, plugin, or remote process figure out
> programatically when such a command is executed on Vim? Could this
> information get logged somewhere?

What would you use it for?

Would this event be triggered after any single command, or after a
series of commands? E.g. when a mapping does three commands, or a
plugin executes a bunch of commands.

--
"Hit any key to continue" it said, but nothing happened after F sharp.

/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12046/1439999396@github.com>

Sebastian Carlos

unread,
Feb 22, 2023, 8:28:39 AM2/22/23
to vim/vim, Subscribed

What would you use it for?

A statistics plugin. And a "vim golf"-like plugin that requires counting the number of commands.

Would this event be triggered after any single command, or after a series of commands? E.g. when a mapping does three commands, or a plugin executes a bunch of commands.

It's fine for me either way. Whatever granularity or approach you consider reasonable or easy to implement is ok by me.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12046/1440019026@github.com>

Reply all
Reply to author
Forward
0 new messages