If you're running Linux and are familiar with the atc game, you probably know what I would love Vim to do. If you don't, allow me to explain.

As you can see from the manpage, atc has a relatively simple command system, where you first name a plane, then a command for that plane, and than arguments. As such you tell plane a to go to altitude of 7000 feet with aa7. The main thing is that its so-called "input area" changes as you type your command: (from memory)


A: altitude

A: altitude 7000

For another example, this is how the game acknowledges a BL command. There is no possible doubt as to what the command you've just typed does. This becomes useful as you start issuing commands like gtte4ab2 (G: turn towards exit 4 at beacon 2).

Well, I'm looking for something that does just that - but for Vim. For example, if I type q, I'd like something like this to happen:

save macro to slot [a-z0-9]:                                              (ESC to cancel)

… and when I hit a:

recording macro to slot a.                                (hit q again to stop recording)

… and then I hit, say, d:

delete [dwbntf...]:                                                       (ESC to cancel)

… and then W:

deleted to next space.                                                        (u to undo)

… and when I hit q again:

recording stopped; macro saved.                                  (run your macro with @a)

… and then I hit @:

playback macro in slot [a]:                                               (ESC to cancel)

You get the idea. Call it training wheels, if you will, or just text confirmation from the program that you've just done what you think you've done (for that awful day when you have to telnet to some old server on an unstable connection and all you've got is some super-stripped down version of vi). :)

Is there anything like that out there?

  • Please note that I'm rather clueless on the subject and what I wrote above in the "explanatory lines" may be wrong
    – badp
    Jun 26 '14 at 22:08
  • I like your idea. When I accidentally press keys which I don't normally use, such as the 'q' key, it would keep me better informed of what's happened. Clearly, others also like your idea — look how many upvotes it has. Have you sent it to the vim-dev mailing list? They can implement your idea in Vim. Alternatively, have you sent it to the evil-mode bug tracker or mailing list? They can implement it in Evil, which is currently the state-of-the-art Vim emulation layer for Emacs. May 27 '15 at 3:19

This talk goes over some related tools:

  • Yeah I don't see this working from the outside :)
    – badp
    May 27 '15 at 19:23

Normally vim can display all keystrokes and commands by executing in vim: :set showcmd or q: (for history), but it doesn't work for partial commands and it won't tell you what the keystroke/command is about.

So as far as I know there is no plugin which does that, because vim doesn't record all keystrokes unless specified by -w where you can record all your commands into file, e.g.: vim -w keys.txt my_file. But the problem is, that vim writes keystrokes only when you exit Vim.

For more advanced solutions, please check: Showing command history with showcmd at Vim SE

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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