Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

: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

1 Answer 1

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
:new
: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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.