I am learning Vim by typing some commands in full rather than using keyboard shortcuts. Is there a tool or plugin that can show me the equivalent shortcuts if they exist, whether they are built in defaults, set by plugins or are user configured?
Shows built-in abbreviations for command quit
:help :quit
Outputs:
:q[uit] Quit the current window. Quit Vim if this is the last
window. This fails when changes have been made and
...
The square brackets indicate the unnecessary characters for the command. Any of the following are equivilant to quit
:
:q
:qu
:qui
:quit
You can even abbreviate the command you are getting help for. For example :h :q
gets help for quit
Shows mapped shortcuts
:map
Shows mapped shortcuts for a specific mode
:imap
:nmap
:cmap
etc...
Shows abbreviations
:abbr
Finds all mappings associated with a command
For example, to find all mappings that use :call
:new
:redir @a
:map
:redir END
:put a
/:call
Explanation: create a new buffer, redirect output to register a, list all mappings, finish redirect, paste register a, search for your command
Shows purely built-in mappings
vim -u NONE
:map
Shows user customizations
:e $MYVIMRC
Show plug-ins
:scriptnames
anything not a built-in or user customization could be from one of the plugins. You could grep the files in scriptnames for your command
Disclaimer
I'm by no means a vi expert. I'm certain there are many other ways to get the information you want. This is just how I would go about it.
-
Welcome to the vi SE site. Could you expand your answer to address the other points raised by the question, for example if commands "are built in defaults, set by plugins or are user configured?" Thanks! – StandardEyre Apr 26 '17 at 17:11
-
I erred by not explaining myself properly. This is the question I wanted to ask in case if you interesetd - vi.stackexchange.com/questions/12250 – vfclists Apr 26 '17 at 20:12
-