commit | 09491746b1b27574237199b53bb90e638dc070c0 | [log] [tgz] |
---|---|---|
author | chatsiri rattana <chatsiri@chatsiri.com> | Sun Jun 03 19:43:26 2012 +0700 |
committer | chatsiri rattana <chatsiri@chatsiri.com> | Sun Jun 03 19:43:26 2012 +0700 |
tree | dbd6c4724dbb55a08dae5d5e3486a1229918acb9 | |
parent | c6ad7bf9252c02a9e0f74c4d5111d0b4c265d85b [diff] |
issues l9
Full path fuzzy file, buffer, mru and tag finder for Vim.
<c-p>
or run :CtrlP
to invoke CtrlP in find file mode.:CtrlPBuffer
or :CtrlPMRU
to invoke CtrlP in buffer or MRU mode.:CtrlPMixed
to search in a mix of files, buffers and MRU files.Once CtrlP is open:
<c-f>
and <c-b>
to switch between find file, buffer, and MRU file modes.<c-d>
to switch to filename only search instead of full path.<c-r>
to switch to regexp mode.<F5>
to purge the cache for the current directory and get new files.:
followed by a command to execute after opening the file.abc:45
will open the file matched the pattern and jump to line 45...
as the input string to go backward the directory tree by 1 level.<c-y>
to create a new file and its parent dirs.<c-z>
to mark/unmark multiple files and <c-o>
to open them.Change the mapping to invoke CtrlP:
let g:ctrlp_map = '<c-p>'
When CtrlP is invoked, it automatically sets its local working directory according to this variable:
let g:ctrlp_working_path_mode = 2
0 - don’t manage working directory.
1 - the parent directory of the current file.
2 - the nearest ancestor that contains one of these directories or files: .git/
.hg/
.svn/
.bzr/
_darcs/
If you want to exclude directories or files from the search, use the Vim’s option wildignore
and/or the option g:ctrlp_custom_ignore
. Examples:
set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux set wildignore+=tmp\*,*.swp,*.zip,*.exe " Windows let g:ctrlp_custom_ignore = '\.git$\|\.hg$\|\.svn$' let g:ctrlp_custom_ignore = { \ 'dir': '\.git$\|\.hg$\|\.svn$', \ 'file': '\.exe$\|\.so$\|\.dll$', \ 'link': 'some_bad_symbolic_links', \ }
Use a custom file listing command with:
let g:ctrlp_user_command = 'find %s -type f' " MacOSX/Linux let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d' " Windows
Check the docs for more mappings, commands and options.