Detect if a key is bound to something in vim

后端 未结 6 1972
暖寄归人
暖寄归人 2020-12-12 12:33

I\'d like to know if there is a way to figure out if a key does something in vim. I know that I can use :map to see user-defined mappings, but is there somethin

6条回答
  •  Happy的楠姐
    2020-12-12 13:10

    To check the default mapping:

    :help index
    

    For other mapping that is done by either users or plugin:

    :map
    :map!
    

    From http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-Tutorial(Part_1):

    The first command displays the maps that work in normal, visual and select and operator pending mode. The second command displays the maps that work in insert and command-line mode.

    Typically the output of the above commands will span several pages. You can use the following set of commands to redirect the output to the vim_maps.txt file:

    :redir! > vim_maps.txt
    :map
    :map!
    :redir END
    

提交回复
热议问题