Skip to content
Newer
Older
100644 73 lines (55 sloc) 2.34 KB
850c742 @kien small edit
kien authored Sep 6, 2011
1 # ctrlp.vim
d18767e @kien mention`wildignore`
kien authored Sep 12, 2011
2 Full path fuzzy __file__, __buffer__ and __MRU__ file finder for Vim.
f823efe @kien some small edits
kien authored Sep 6, 2011
3
4ca1ab9 @kien some small changes
kien authored Sep 5, 2011
4 * Written in pure Vimscript for MacVim and Vim 7.0+.
c8d02c5 @kien Enhancements for prompt history and :CtrlP [start-dir]
kien authored Oct 7, 2011
5 * Full support for Vim’s regexp as search pattern.
6 * Built-in Most Recently Used (MRU) files monitoring.
7 * Built-in project’s root finder.
0af1cdc @kien Find root with '/' and '\'
kien authored Nov 12, 2011
8 * Open Multiple Files.
2f4d281 @kien Preserve neighboring windows' height
kien authored Nov 9, 2011
9 * [Extensible][3].
b6f1539 @kien various changes
kien authored Aug 22, 2011
10
11 ![ctrlp][1]
12
13 ## Basic Usage
ae6f159 @kien Some improvements
kien authored Nov 4, 2011
14 * Press `<c-p>` or run `:CtrlP` to invoke CtrlP in find file mode.
ef9e072 @kien Tag and Quickfix extensions
kien authored Nov 28, 2011
15 * Or run `:CtrlPBuffer` or `:CtrlPMRU` to invoke CtrlP in buffer or MRU mode.
1a2c3ee @kien Open Multiple Files
kien authored Oct 3, 2011
16
17 Once CtrlP is open:
18
19 * Press `<c-f>` and `<c-b>` to switch between find file, buffer, and MRU file modes.
20 * Press `<c-d>` to switch to filename only search instead of full path.
c360f2d @kien sorting and escaping
kien authored Sep 13, 2011
21 * Use `*` or `|` in the prompt to submit the string as a Vim’s regexp pattern.
0af1cdc @kien Find root with '/' and '\'
kien authored Nov 12, 2011
22 * Or press `<c-r>` to switch to regexp mode.
1a2c3ee @kien Open Multiple Files
kien authored Oct 2, 2011
23 * End the input string with a colon `:` followed by a command to execute after opening the file.
24 e.g. `abc:45` will open the file matched the pattern and jump to line 45.
df2622f @kien update readme with new `..` input
kien authored Sep 9, 2011
25 * Submit two dots `..` as the input string to go backward the directory tree by 1 level.
1a2c3ee @kien Open Multiple Files
kien authored Oct 2, 2011
26 * Use `<c-y>` to create a new file and its parent dirs.
6ee4410 @kien Improve Open Multiple Files
kien authored Oct 9, 2011
27 * Use `<c-z>` to mark/unmark files and `<c-o>` to open them.
b6f1539 @kien various changes
kien authored Aug 22, 2011
28
4ca1ab9 @kien some small changes
kien authored Sep 5, 2011
29 ## Basic Options
30 * Change the mapping to invoke CtrlP:
bdfb4c5 @kien should be good now
kien authored Sep 6, 2011
31
b6f1539 @kien various changes
kien authored Aug 22, 2011
32 ```vim
33 let g:ctrlp_map = '<c-p>'
34 ```
bdfb4c5 @kien should be good now
kien authored Sep 6, 2011
35
d17beb0 @kien bug fix and clean up
kien authored Sep 8, 2011
36 * When CtrlP is invoked, it automatically sets the working directory according to this variable:
cbad949 @kien small edit
kien authored Sep 6, 2011
37
b6f1539 @kien various changes
kien authored Aug 22, 2011
38 ```vim
ae6f159 @kien Some improvements
kien authored Nov 4, 2011
39 let g:ctrlp_working_path_mode = 2
b6f1539 @kien various changes
kien authored Aug 22, 2011
40 ```
cbad949 @kien small edit
kien authored Sep 5, 2011
41
ba935d9 @kien fix readme
kien authored Sep 6, 2011
42 0 - don’t manage working directory.
4ca1ab9 @kien some small changes
kien authored Sep 5, 2011
43 1 - the parent directory of the current file.
fbcfec2 @kien New feature: search most recently opened files
kien authored Sep 7, 2011
44 2 - the nearest ancestor that contains one of these directories or files:
cbad949 @kien small edit
kien authored Sep 5, 2011
45
4ca1ab9 @kien some small changes
kien authored Sep 5, 2011
46 .git/
47 .hg/
48 .bzr/
49 _darcs/
50 root.dir
51 .vimprojects
cbad949 @kien small edit
kien authored Sep 5, 2011
52
d18767e @kien mention`wildignore`
kien authored Sep 11, 2011
53 * If you want to exclude directories or files from the search, you can use the Vim’s option `wildignore`.
ae6f159 @kien Some improvements
kien authored Nov 4, 2011
54 Examples:
d18767e @kien mention`wildignore`
kien authored Sep 11, 2011
55
56 ```vim
e311264 @kien update docs on using wildignore
kien authored Sep 14, 2011
57 set wildignore+=*/.git/*,*/.hg/*,*/.svn/* " for Linux/MacOSX
58 set wildignore+=.git\*,.hg\*,.svn\* " for Windows
d18767e @kien mention`wildignore`
kien authored Sep 11, 2011
59 ```
60
6ee4410 @kien Improve Open Multiple Files
kien authored Oct 9, 2011
61 * Use a custom file listing command with:
62
63 ```vim
64 let g:ctrlp_user_command = 'find %s -type f' " MacOSX/Linux
65 let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d' " Windows
66 ```
67
bfd9800 @kien Various changes:
kien authored Sep 18, 2011
68 _Check [the docs][2] for more mappings, commands and options._
b6f1539 @kien various changes
kien authored Aug 22, 2011
69
1a2c3ee @kien Open Multiple Files
kien authored Oct 2, 2011
70 [1]: http://i.imgur.com/3rtLt.png
bfd9800 @kien Various changes:
kien authored Sep 18, 2011
71 [2]: https://github.com/kien/ctrlp.vim/blob/master/doc/ctrlp.txt
0319703 @kien Support user extensions
kien authored Oct 23, 2011
72 [3]: https://github.com/kien/ctrlp.vim/tree/extensions
Something went wrong with that request. Please try again.