Monday, March 26, 2012

Re: A function to display all Functional keys F1 ~ F12

On 16:25 Mon 26 Mar , Christian Brabandt wrote:
> On Mon, March 26, 2012 16:13, Marcin Szamotulski wrote:
> > I was trying to make it a bit better using the following loop:
> >
> > for i in range(1,12)
> > redir! >= map
> > exe "silent ".(a:bang == "!" ? 'verbose' : '') . " map<F".i.">"
> > redir end
> > if map !~ 'No mapping found'
> > echomsg map
> > endif
> > endfor
> >
> > But I get an error that map is not defined.
>
> It should be redir => map
>
> Not sure, why your second version works.
>
> regards,
> Christian
>
> --
> 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

Thanks! I guess I actually did the mistake in both loops.

Marcin

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