Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 80 lines (60 sloc) 2.953 kb
850c742 @kien small edit
authored
1 # ctrlp.vim
5929844 @kien Update readme
authored
2 Full path fuzzy __file__, __buffer__, __mru__, __tag__, __...__ finder for Vim.
f823efe @kien some small edits
authored
3
4b9c014 @kien Update docs
authored
4 * Written in pure Vimscript for MacVim, gVim and Vim 7.0+.
5 * Full support for Vim's regexp as search patterns.
c8d02c5 @kien Enhancements for prompt history and :CtrlP [start-dir]
authored
6 * Built-in Most Recently Used (MRU) files monitoring.
4b9c014 @kien Update docs
authored
7 * Built-in project's root finder.
9c9e120 @kien Update readme
authored
8 * Open multiple files at once.
9 * Create new files and directories.
4b9c014 @kien Update docs
authored
10 * [Extensible][2].
b6f1539 @kien various changes
authored
11
12 ![ctrlp][1]
13
4b9c014 @kien Update docs
authored
14 ## Installation
5929844 @kien Update readme
authored
15 Use your favorite method or check the homepage for a [quick installation guide][3].
4b9c014 @kien Update docs
authored
16
5929844 @kien Update readme
authored
17 ## Basic Usage
18 * Run `:CtrlP` or `:CtrlP [starting-directory]` to invoke CtrlP in find file mode.
19 * Run `:CtrlPBuffer` or `:CtrlPMRU` to invoke CtrlP in buffer or MRU mode.
20 * Run `:CtrlPMixed` to search in a mix of files, buffers and MRU files.
4b9c014 @kien Update docs
authored
21
5929844 @kien Update readme
authored
22 More at `:help ctrlp-commands` and `:help ctrlp-extensions`.
4b9c014 @kien Update docs
authored
23
5929844 @kien Update readme
authored
24 ##### Once CtrlP is open:
25 * Press `<c-f>` and `<c-b>` to cycle between modes.
26 * Press `<c-d>` to switch to filename only search instead of full path.
27 * Press `<c-r>` to switch to regexp mode.
28 * Press `<F5>` to purge the cache for the current directory and get new files.
29 * Use `<c-n>`, `<c-p>` to select the next/previous string in the prompt's history.
30 * Use `<c-y>` to create a new file and its parent directories.
31 * Use `<c-z>` to mark/unmark multiple files and `<c-o>` to open them.
4b9c014 @kien Update docs
authored
32
5929844 @kien Update readme
authored
33 More at `:help ctrlp-mappings`.
4b9c014 @kien Update docs
authored
34
5929844 @kien Update readme
authored
35 * Submit two or more dots `..` to go up the directory tree by one or multiple levels.
36 * End the input string with a colon `:` followed by a command to execute it on the opening file(s):
37 Use `:45` to jump to line 45.
38 Use `:/any\:\ string` to jump to the first instance of `any: string`.
39 Use `:diffthis` when opening multiple files to run `:diffthis` on the first 4 files.
4b9c014 @kien Update docs
authored
40
5929844 @kien Update readme
authored
41 ## Basic Options
42 * When invoked, unless a starting directory is specified, CtrlP will set its local working directory according to this variable:
cbad949 @kien small edit
authored
43
b6f1539 @kien various changes
authored
44 ```vim
ae6f159 @kien Some improvements
authored
45 let g:ctrlp_working_path_mode = 2
b6f1539 @kien various changes
authored
46 ```
cbad949 @kien small edit
authored
47
4b9c014 @kien Update docs
authored
48 0 - don't manage working directory.
9c9e120 @kien Update readme
authored
49 1 - the directory of the current file.
fbcfec2 @kien New feature: search most recently opened files
authored
50 2 - the nearest ancestor that contains one of these directories or files:
4b9c014 @kien Update docs
authored
51 `.git` `.hg` `.svn` `.bzr` `_darcs`
52
53 Define additional root markers with the `g:ctrlp_root_markers` option.
cbad949 @kien small edit
authored
54
5929844 @kien Update readme
authored
55 * Exclude files and directories using Vim's `wildignore` or CtrlP's own `g:ctrlp_custom_ignore` option:
d18767e @kien mention`wildignore`
authored
56
57 ```vim
8dde6d0 @kien Update docs
authored
58 set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux
59 set wildignore+=tmp\*,*.swp,*.zip,*.exe " Windows
9690757 @kien Version 1.6.6
authored
60
61 let g:ctrlp_custom_ignore = {
62 \ 'dir': '\.git$\|\.hg$\|\.svn$',
63 \ 'file': '\.exe$\|\.so$\|\.dll$',
f1db125 @kien Improve <tab> completion
authored
64 \ 'link': 'some_bad_symbolic_links',
9690757 @kien Version 1.6.6
authored
65 \ }
d18767e @kien mention`wildignore`
authored
66 ```
67
9c9e120 @kien Update readme
authored
68 * Use a custom file listing command:
6ee4410 @kien Improve Open Multiple Files
authored
69
70 ```vim
8dde6d0 @kien Update docs
authored
71 let g:ctrlp_user_command = 'find %s -type f' " MacOSX/Linux
72 let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d' " Windows
6ee4410 @kien Improve Open Multiple Files
authored
73 ```
74
4b9c014 @kien Update docs
authored
75 More at `:help ctrlp-options`.
b6f1539 @kien various changes
authored
76
f041969 @kien Resolve some issues
authored
77 [1]: http://i.imgur.com/yIynr.png
4b9c014 @kien Update docs
authored
78 [2]: https://github.com/kien/ctrlp.vim/tree/extensions
5929844 @kien Update readme
authored
79 [3]: http://kien.github.com/ctrlp.vim
Something went wrong with that request. Please try again.