CtrlP is a popular plugin for Vim. It makes it very easy to open files by just typing a portion of the filename you can recall. It allows you to find and open files from mainly three lists: files around the current directory, your currently open buffers and from the most recently used (MRU) list of files.
The plugin can be installed easily from its Github repository: https://github.com/ctrlpvim/ctrlp.vim
- Invoke the plugin by pressing
Ctrl+p. By default, CtrlP allows you to open the files around the current directory. They can be filtered down by typing any part of their filename. As each letter is typed, the list of files displayed grows shorter.
If you want to search among MRU or buffers, press
Ctrl+fonce or twice to switch to those modes. Press
Escat any time to dismiss the CtrlP window.
To search in MRU by default, add this line to your
let g:ctrlp_cmd = 'CtrlPMRU'
- To search in buffers by default, add this line to your
let g:ctrlp_cmd = 'CtrlPBuffer'
- You cannot move up and down the list of files using the
ksince you need them to type filename characters. Instead you can use
Ctrl+kto achieve the same.
Tried with: Vim 7.4 and Ubuntu 14.04