Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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