Skip to content
This repository
Newer
Older
100644 55 lines (47 sloc) 1.893 kb
850c7429 »
2011-09-06 small edit
1 # ctrlp.vim
f823efef »
2011-09-06 some small edits
2 Full path fuzzy file and buffer finder for Vim.
3
4ca1ab9e »
2011-09-05 some small changes
4 * Written in pure Vimscript for MacVim and Vim 7.0+.
f823efef »
2011-09-06 some small edits
5 * Has full support for Vim’s regexp as search pattern, and more.
b6f15390 »
2011-08-22 various changes
6
7 ![ctrlp][1]
8
9 ## Basic Usage
10 * Press `<c-p>` or run `:CtrlP` to invoke CtrlP.
4ca1ab9e »
2011-09-05 some small changes
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.
b6f15390 »
2011-08-22 various changes
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
4ca1ab9e »
2011-09-05 some small changes
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.
b6f15390 »
2011-08-22 various changes
21
4ca1ab9e »
2011-09-05 some small changes
22 _Screenshot: filename only mode with the match window focused._
23 ![ctrlp filename mode, match window focused][2]
b6f15390 »
2011-08-22 various changes
24
4ca1ab9e »
2011-09-05 some small changes
25 ## Basic Options
26 * Change the mapping to invoke CtrlP:
b6f15390 »
2011-08-22 various changes
27 ```vim
28 let g:ctrlp_map = '<c-p>'
29 ```
4ca1ab9e »
2011-09-05 some small changes
30 * When starting up CtrlP, it automatically sets the working directory to:
b6f15390 »
2011-08-22 various changes
31 ```vim
32 let g:ctrlp_working_path_mode = 1
33 ```
4ca1ab9e »
2011-09-05 some small changes
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.
b6f15390 »
2011-08-22 various changes
45 * You can also use the set-working-directory functionality outside of CtrlP by
4ca1ab9e »
2011-09-05 some small changes
46 adding the following line to your vimrc; the parameter is the same (1, 2 or 0):
b6f15390 »
2011-08-22 various changes
47 ```vim
48 au BufEnter * cal ctrlp#SetWorkingPath(2)
49 ```
50
f823efef »
2011-09-06 some small edits
51 _Check the docs for more mappings, commands and options._
b6f15390 »
2011-08-22 various changes
52
4daf1653 »
2011-09-06 fix images
53 [1]: http://i.imgur.com/lQScr.png
54 [2]: http://i.imgur.com/MyRIv.png
Something went wrong with that request. Please try again.