ctrlp
Install ctrlp with vundle:
Plugin 'ctrlp.vim'
It is more powerful, faster than FuzzyFinder, and easier to install and use.
Use
In the search results window, you have 2 ways to open the selected file:
-
press
to open file in current window, -
press
to choose how to open the file, for example "h" to open it in a new horizontal window. -
Add
let g:ctrlp_custom_ignore = { 'dir': 'node_modules\|.git' }
into .vimrc to exclude folder node_modules from search list. Notice that the backslash before|
is mandatory. If this does not work, delete folder~/.cache/ctrlp
, or run:ClearAllCtrlPCaches
in vim.
FuzzyFinder
FuzzyFinder (created by Takeshi NISHIDA) is a powerful search tool like "go to everything" in sublime text 2. Command-T is a similar tool. But it need ruby and have to compile it.
L9 plugin (also created by Takeshi NISHIDA) is needed to use this plugin.
Search and Open File
CoverageFile Mode
This mode is invoked by command :FufCoverageFile. It includes all files in current working directory and subdirectories. Note it only matches characters in one name.
Say you have a file at ./abc/def/stu.xyz, you can find it with "suyz", "sxyz" or any combinations of characters in "stu.xyz". But "ads" and "des" will match nothing. You can find it with partial name, in this case "d/s" will get stu.xyz.
Add nnoremap <C-o> :FufCoverageFile<CR>
in ~/.vimrc to map ctrl-o to invoke Coverage File command,
then input the filename pattern, then press
File Mode
This mode is invoked by command :FufFile. It only includes files in current working directory, without files in subdirectories (so not very useful).