How to search in the Vim mapping listing?

前端 未结 3 1105
失恋的感觉
失恋的感觉 2021-02-07 12:22

Using :map provides a list of all mappings in Vim. But, I am unable to search through the list. I am surprised to see it being opened in a different type of window

3条回答
  •  清酒与你
    2021-02-07 12:54

    Don't be surprised. :map is not related at all with :help so there's no reason whatsoever to expect it to work like :help.

    You can give :map an argument to narrow-down the listing:

    :map ,
    

    With the right values for wildmenu and/or wildmode, you can tab-complete :map:

    :map ,
    

    You can also list the current mappings with :

    :map 
    

    You can also use the mode-specific variants of :map to get a more manageable list:

    :imap ,
    :nmap ,
    :xmap ,
    and so on…
    

    But keep in mind that :map only lists custom mappings (made by you or your plugins). If you want a list of default mappings, check out :help index.

提交回复
热议问题