> Helo vim_use!
>
> I'm trying to make a cmap which maps<tab> to<c-l> but only for the :edit
> command. My idea was to use something like:
> cnoremap<expr> <tab> getcmdline() =~ '^:\Ce\%[dit]\>' ? "<c-l>" :"<tab>"
>
> Any ideas how to make it work? I tried to use the expression register (:help
> c_CTRL-R_=) but with no success.
>
> Best regards,
> Marcin Szamotulski
getcmdline() does not return a leading colon ":" (need to exclude it
from the pattern).
Also, <Tab> in the {rhs} won't work:
:h 'wc
:h 'wcm
e.g. you have to set 'wildcharm' and then use <C-Z>.
--
Andy
--
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:
Post a Comment