Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

:map command on vim displays the list of current mappings. The problem is that the list is rather long and I don't see a way to search within it.

Is there a way to load this map into a regular vim buffer? some other way to search?

(I know I can do :map foo to get all mappings starting with foo, but this is not enough)

share|improve this question
up vote 2 down vote accepted

One way to do this is to use :redir to redirect the output of the :map command to a register, then paste that register into a new buffer. For example:

:set nomore
:redir @a
:map foo
:redir END
:set more
:put a

The :set nomore and :set more commands turn off and back on paging so that you don't have to hit the space bar to see each page of command output while you're capturing it in the register. See

:help :redir
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .