vim-pluginctrlp

How do I open ctrlp plugin file suggestions in Insert mode?


I'm using CtrlP plugin to switch to other files in Vim by pressing Ctrl-p. But this only works in normal mode. I want to trigger it by pressing the same set of keys in insert mode as well. How can I do that? I couldn't find any mapping for insert mode in the help doc.


Solution

  • Tried inoremap <C-p> <Esc>:CtrlP<CR> and it worked. Credit goes to @statox, who answered this question here