> I want to map<C-p> and<C-n> in command-line mode to vim equivalent of zle
> widgets history-beginning-search-backward and history-beginning-search-forward
> (it is what vim does when you press<Up> or<Down> in command line), but retain
> their functionality when completion is active. If I were talking about insert
> mode, I would do
>
> inoremap<expr> <C-p> ((pumvisible())?("\<C-p>"):("\<Up>"))
>
> . What I should do in command line mode?
Unless I'm missing a new feature, you can't check for it.
btw: shouldn't your command be written in one of the following ways:
:inoremap <expr> <C-p> ((pumvisible())?("<C-p>"):("<Up>"))
:inoremap <expr> <C-p> ((pumvisible())?("\<lt>C-p>"):("\<lt>Up>"))
--
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