CtrlP plugin for Vim

CtrlP in action
CtrlP in action

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+f once or twice to switch to those modes. Press Esc at any time to dismiss the CtrlP window.

  • To search in MRU by default, add this line to your .vimrc file:

let g:ctrlp_cmd = 'CtrlPMRU'
  • To search in buffers by default, add this line to your .vimrc file:
let g:ctrlp_cmd = 'CtrlPBuffer'
  • You cannot move up and down the list of files using the j and k since you need them to type filename characters. Instead you can use Ctrl+j and Ctrl+k to achieve the same.

Tried with: Vim 7.4 and Ubuntu 14.04


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s