Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 89 lines (67 sloc) 3.464 kB
850c742 @kien small edit
authored
1 # ctrlp.vim
78c2435 @kien Revert "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
5929844 @kien Update readme
authored
14 ## Basic Usage
15 * Run `:CtrlP` or `:CtrlP [starting-directory]` to invoke CtrlP in find file mode.
4e38004 @kien Update docs
authored
16 * Run `:CtrlPBuffer` or `:CtrlPMRU` to invoke CtrlP in find buffer or find MRU file mode.
17 * Run `:CtrlPMixed` to search in Files, Buffers and MRU files at the same time.
4b9c014 @kien Update docs
authored
18
4e38004 @kien Update docs
authored
19 Check `:help ctrlp-commands` and `:help ctrlp-extensions` for other commands.
4b9c014 @kien Update docs
authored
20
5929844 @kien Update readme
authored
21 ##### Once CtrlP is open:
2927ce4 @kien Update readme
authored
22 * Press `<F5>` to purge the cache for the current directory to get new files, remove deleted files and apply new ignore options.
5929844 @kien Update readme
authored
23 * Press `<c-f>` and `<c-b>` to cycle between modes.
24 * Press `<c-d>` to switch to filename only search instead of full path.
25 * Press `<c-r>` to switch to regexp mode.
26 * Use `<c-n>`, `<c-p>` to select the next/previous string in the prompt's history.
27 * Use `<c-y>` to create a new file and its parent directories.
28 * Use `<c-z>` to mark/unmark multiple files and `<c-o>` to open them.
4b9c014 @kien Update docs
authored
29
4e38004 @kien Update docs
authored
30 Run `:help ctrlp-mappings` or submit `?` in CtrlP for more mapping help.
4b9c014 @kien Update docs
authored
31
5929844 @kien Update readme
authored
32 * Submit two or more dots `..` to go up the directory tree by one or multiple levels.
33 * End the input string with a colon `:` followed by a command to execute it on the opening file(s):
4e38004 @kien Update docs
authored
34 Use `:25` to jump to line 25.
5929844 @kien Update readme
authored
35 Use `:/any\:\ string` to jump to the first instance of `any: string`.
c2a9627 @kien Update docs
authored
36 Use `:+setfiletype\ myfiletype|25` to set the filetype to myfiletype, then jump to line 25.
37 Use `:diffthis` when opening multiple files to run `:diffthis` on the first 4 files.
4b9c014 @kien Update docs
authored
38
5929844 @kien Update readme
authored
39 ## Basic Options
4e38004 @kien Update docs
authored
40 * Change the default mapping and the default command to invoke CtrlP:
41
42 ```vim
43 let g:ctrlp_map = '<c-p>'
44 let g:ctrlp_cmd = 'CtrlP'
45 ```
46
2927ce4 @kien Update readme
authored
47 * When invoked, unless a starting directory is specified, CtrlP will set its local working directory according to this variable:
cbad949 @kien small edit
authored
48
b6f1539 @kien various changes
authored
49 ```vim
188de26 @kien Rewrite WD related functions
authored
50 let g:ctrlp_working_path_mode = 'rc'
b6f1539 @kien various changes
authored
51 ```
cbad949 @kien small edit
authored
52
4b6670a @kien Update docs
authored
53 `'c'` - the directory of the current file.
54 `'r'` - the nearest ancestor that contains one of these directories or files:
55 `.git` `.hg` `.svn` `.bzr` `_darcs`
56 `0` or `''` (empty string) - don't manage working directory.
4b9c014 @kien Update docs
authored
57
58 Define additional root markers with the `g:ctrlp_root_markers` option.
cbad949 @kien small edit
authored
59
4e38004 @kien Update docs
authored
60 * Exclude files and directories using Vim's `wildignore` and CtrlP's own `g:ctrlp_custom_ignore`:
d18767e @kien mention`wildignore`
authored
61
62 ```vim
c2a9627 @kien Update docs
authored
63 set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux
64 set wildignore+=*\\tmp\\*,*.swp,*.zip,*.exe " Windows
9690757 @kien Version 1.6.6
authored
65
093b1c2 @kien Option to use the ignore options for g:ctrlp_user_command
authored
66 let g:ctrlp_custom_ignore = '\v(\.git|\.hg|\.svn)($|[\/])'
9690757 @kien Version 1.6.6
authored
67 let g:ctrlp_custom_ignore = {
093b1c2 @kien Option to use the ignore options for g:ctrlp_user_command
authored
68 \ 'dir': '\v(\.git|\.hg|\.svn)($|[\/])',
9690757 @kien Version 1.6.6
authored
69 \ 'file': '\.exe$\|\.so$\|\.dll$',
f1db125 @kien Improve <tab> completion
authored
70 \ 'link': 'some_bad_symbolic_links',
9690757 @kien Version 1.6.6
authored
71 \ }
d18767e @kien mention`wildignore`
authored
72 ```
73
9c9e120 @kien Update readme
authored
74 * Use a custom file listing command:
6ee4410 @kien Improve Open Multiple Files
authored
75
76 ```vim
8dde6d0 @kien Update docs
authored
77 let g:ctrlp_user_command = 'find %s -type f' " MacOSX/Linux
78 let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d' " Windows
6ee4410 @kien Improve Open Multiple Files
authored
79 ```
80
4e38004 @kien Update docs
authored
81 Check `:help ctrlp-options` for other options.
82
83 ## Installation
84 Use your favorite method or check the homepage for a [quick installation guide][3].
b6f1539 @kien various changes
authored
85
f041969 @kien Resolve some issues
authored
86 [1]: http://i.imgur.com/yIynr.png
4b9c014 @kien Update docs
authored
87 [2]: https://github.com/kien/ctrlp.vim/tree/extensions
6c38c7e @kien Update readme
authored
88 [3]: http://kien.github.com/ctrlp.vim#installation
Something went wrong with that request. Please try again.