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?
signature.asc
Description: This is a digitally signed message part.