Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 49 lines (41 sloc) 1.69 kB
b6f1539 @kien various changes
authored
1 Full path fuzzy file finder with an intuitive interface. Written in pure
2 Vimscript. Has full support for Vim’s regexp as search pattern, and more.
3
4 ![ctrlp][1]
5 ![ctrlp file name mode, match window focused][2]
6
7 ## Basic Usage
8
9 * Press `<c-p>` or run `:CtrlP` to invoke CtrlP.
10 * Use `*` `?` `^` `+` or `|` in the prompt to submit the string as a Vim’s
11 regexp pattern. Or press `<c-r>` to switch to full regexp mode.
12 * Ever remember only the file name but not where it is? Press `<c-d>` while in
13 the prompt to switch to file name only search. Press `<c-d>` again to switch
14 back to full path search.
15 * End the input string with a colon `:` followed by a number to jump to that
16 line in the selected file.
17 e.g. `abc:45` to open the file matched the pattern `abc` and jump to
18 line 45.
19
20 ## Basic Options
21
22 * Change the mapping to invoke CtrlP with:
23 ```vim
24 let g:ctrlp_map = '<c-p>'
25 ```
26 * When starting up the prompt, automatically set the working directory to:
27 1 - the parent directory of the current file.
28 2 - the nearest ancestor that contains one of these directories/files:
29 .git/
30 .hg/
31 .bzr/
32 _darcs/
33 root.dir
34 .vimprojects
35 0 - don’t manage working directory.
36 ```vim
37 let g:ctrlp_working_path_mode = 1
38 ```
39 * You can also use the set-working-directory functionality outside of CtrlP by
40 adding the following line to your vimrc; the parameter is the same (1, 2 and 0):
41 ```vim
42 au BufEnter * cal ctrlp#SetWorkingPath(2)
43 ```
44
45 Check the docs for more mappings and options.
46
47 [1]: http://designslicer.com/vim/images/ctrlp1.png
48 [2]: http://designslicer.com/vim/images/ctrlp2.png
Something went wrong with that request. Please try again.