Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.