Mercurial > public > dotfiles
comparison vim/vimfiles/bundle/ctrlp.vim/readme.md @ 7:86e0ac713642
Re-added the latest ctrlp.vim plugin.
The ctrlp.vim commit was e61e7d5b801ade5fcefeab3aca75c1f37d54bdf1.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 29 Apr 2012 16:20:31 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
6:ff60fbc930de | 7:86e0ac713642 |
---|---|
1 # ctrlp.vim | |
2 Full path fuzzy __file__, __buffer__, __mru__ and __tag__ finder for Vim. | |
3 | |
4 * Written in pure Vimscript for MacVim and Vim 7.0+. | |
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. | |
8 * Open Multiple Files. | |
9 * [Extensible][3]. | |
10 | |
11 ![ctrlp][1] | |
12 | |
13 ## Basic Usage | |
14 * Press `<c-p>` or run `:CtrlP` to invoke CtrlP in find file mode. | |
15 * Run `:CtrlPBuffer` or `:CtrlPMRU` to invoke CtrlP in buffer or MRU mode. | |
16 * Or run `:CtrlPMixed` to search in a mix of files, buffers and MRU files. | |
17 | |
18 Once CtrlP is open: | |
19 | |
20 * Press `<c-f>` and `<c-b>` to switch between find file, buffer, and MRU file | |
21 modes. | |
22 * Press `<c-d>` to switch to filename only search instead of full path. | |
23 * Press `<c-r>` to switch to regexp mode. | |
24 * Press `<F5>` to purge the cache for the current directory and get new files. | |
25 * End the input string with a colon `:` followed by a command to execute after | |
26 opening the file. | |
27 e.g. `abc:45` will open the file matched the pattern and jump to line 45. | |
28 * Submit two dots `..` as the input string to go backward the directory tree by | |
29 1 level. | |
30 * Use `<c-y>` to create a new file and its parent dirs. | |
31 * Use `<c-z>` to mark/unmark multiple files and `<c-o>` to open them. | |
32 | |
33 ## Basic Options | |
34 * Change the mapping to invoke CtrlP: | |
35 | |
36 ```vim | |
37 let g:ctrlp_map = '<c-p>' | |
38 ``` | |
39 | |
40 * When CtrlP is invoked, it automatically sets its local working directory | |
41 according to this variable: | |
42 | |
43 ```vim | |
44 let g:ctrlp_working_path_mode = 2 | |
45 ``` | |
46 | |
47 0 - don’t manage working directory. | |
48 1 - the parent directory of the current file. | |
49 2 - the nearest ancestor that contains one of these directories or files: | |
50 `.git/` `.hg/` `.svn/` `.bzr/` `_darcs/` | |
51 | |
52 * If you want to exclude directories or files from the search, use the Vim’s | |
53 option `wildignore` and/or the option `g:ctrlp_custom_ignore`. Examples: | |
54 | |
55 ```vim | |
56 set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux | |
57 set wildignore+=tmp\*,*.swp,*.zip,*.exe " Windows | |
58 | |
59 let g:ctrlp_custom_ignore = '\.git$\|\.hg$\|\.svn$' | |
60 let g:ctrlp_custom_ignore = { | |
61 \ 'dir': '\.git$\|\.hg$\|\.svn$', | |
62 \ 'file': '\.exe$\|\.so$\|\.dll$', | |
63 \ 'link': 'some_bad_symbolic_links', | |
64 \ } | |
65 ``` | |
66 | |
67 * Use a custom file listing command with: | |
68 | |
69 ```vim | |
70 let g:ctrlp_user_command = 'find %s -type f' " MacOSX/Linux | |
71 let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d' " Windows | |
72 ``` | |
73 | |
74 _Check [the docs][2] for more mappings, commands and options._ | |
75 | |
76 [1]: http://i.imgur.com/yIynr.png | |
77 [2]: https://github.com/kien/ctrlp.vim/blob/master/doc/ctrlp.txt | |
78 [3]: https://github.com/kien/ctrlp.vim/tree/extensions |