gitmyhub

ctrlp.vim

VimL ★ 7.2k updated 4y ago

Fuzzy file, buffer, mru, tag, etc finder.

A Vim plugin that lets you instantly find and open files, buffers, or code tags by typing a few characters from their name, with fuzzy matching that filters results in real time as you type, no external tools required.

VimLVimsetup: easycomplexity 2/5

ctrlp.vim is a Vim plugin that lets you search for and open files by typing a few characters from their name, without needing to know the full path or exact filename. As you type, it filters the list of files in real time, showing only ones that match your partial input. This style of search is called fuzzy finding, and it is especially useful in large projects where files are spread across many nested directories.

Beyond files, the plugin can also search open buffers (files currently loaded in your Vim session), recently used files, and code tags. You can switch between these different search modes while the finder is open. Opening a result can be done in the current window, a new tab, or a split pane. You can also mark multiple results and open them all at once, or type a colon followed by a command to run that command on the file as it opens (such as jumping straight to a specific line number).

The plugin detects the root of your project automatically by looking for markers like a .git or .svn directory, so it searches from the project root rather than just the current folder. You can configure which files and directories to exclude from results, and optionally replace its built-in file listing with a custom shell command.

ctrlp.vim is written entirely in VimScript, so it runs inside Vim without external dependencies. It works with MacVim, gVim, and Vim 7.0 and above.

The README notes that this repository is no longer maintained and directs users to an actively maintained fork.

Where it fits