There is a tricky way to show all vim keystrokes which were pressed by using -w
parameter which record all the characters that you type in the file. The problem is, that vim writes keystrokes only when you exit Vim as Benoit already said.
To workaround this, Kana Natsuno came up with this single-line patch, which disables buffering of the -w
option, so you have access to realtime stream of keystrokes. Then it's a matter of reading them (e.g. tail -f
), parsing or you can try to display them in the statusbar (:set statusline
).
Check out a custom build of Vim using Drew's live-stream-keystrokes branch of MacVim, to get the realtime stream of keystrokes.
Source: Vimprint - a Vim keystroke parser at Drew Neil blog
This is useful if you'd like to reveal the Vim pressed keystrokes in live video tutorials (or GIFs).