Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to affect the behavior of all vim normal-mode commands? Say, after every command succeeds, I want to trigger some post-behavior.

share|improve this question
up vote 2 down vote accepted

No, you cannot do this; you only have the events at :help autocmd-events at your disposal. You would have to overload every normal mode command with a custom mapping; this is especially tricky for commands like y{motion}.

Please give more background; what is your final goal? When a question is only about a small technical step, it's difficult to provide a good answer. If you don't tell us why you want this, it's easy to succumb to the XY problem.

share|improve this answer
Thanks for the answer and pointing out the pitfalls of asking a question. – day Apr 13 '13 at 11:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.