Wednesday, December 21, 2011

cmap

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

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