Saturday, April 14, 2012

Re: Look up key binding for command

On 14:36 Sat 14 Apr , Michael Ludwig wrote:
> Let's say I'm exploring some feature, like ":help quickfix".
> I then see :cnext (also :cn) in the documentation, and I'm
> wondering whether it's bound to some key mapping. What's the
> best way to find out? I did the following, but there might
> be a better way:
>
> :redir hhh.txt
> :map
> :redir end
> :e hhh.txt
> /cnext
>
> (By the way, :cnext isn't bound to any command in my setup.)
>
> Michael
>
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php

Note vim normal commands are done internally by vim and not by a :map command.
So for example you will not find CTRL-W_CTRL-N (:help CTRL-W_CTRL-N) in any
map though it behaves like :new command. Usually, the help file is written in
such a way that ex-command is written together with the corresponding normal
command, like in: ":help :new" and ":help CTRL-W_CTRL-N".

However, there are many maps defined by plugins and that's why all the :map commands
are useful (knowing the key, e.g. :map <F10>). I wrote a plugin to search in
right or left side of a map:
http://www.vim.org/scripts/script.php?script_id=3767

You can also use :helpgrep command to grep in the docs (consult ":help :helpgrep")

Best regards,
Marcin Szamotulski

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: