user2766123
user2766123

Reputation: 115

Find :command being called from keyboard shortcut in vim

Is there a way to lookup the :command being called in vim when I press the keyboard shortcut?

Ie. pressing u will do the equivalent of calling :undo in the command line. Is there a way to determine :undo if I only know the command u?

Upvotes: 2

Views: 81

Answers (1)

Ingo Karkat
Ingo Karkat

Reputation: 172668

Not directly, but the (excellent) help will usually give you a big clue. For example, directly after the entry for :help u, there's the documentation for :undo. Likewise, shortly after :help J, there's the :join command. That should usually suffice.

In case the key is mapped, :verbose map {key} will tell you what it's mapped to, and by which plugin.

Upvotes: 3

Related Questions