Mercurial > public > dotfiles
comparison vim/vimfiles/doc/ctrlp.txt @ 3:92af3257a261
Update to latest ctrlp.vim.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 04 Jan 2012 19:37:22 -0600 |
parents | 48859d9c82c5 |
children |
comparison
equal
deleted
inserted
replaced
2:611e13daeafb | 3:92af3257a261 |
---|---|
1 *ctrlp.txt* Fuzzy file, buffer, mru and tag finder. v1.6.4 | 1 *ctrlp.txt* Fuzzy file, buffer, mru and tag finder. v1.6.5 |
2 *CtrlP* *ControlP* *'ctrlp'* *'ctrl-p'* | 2 *CtrlP* *ControlP* *'ctrlp'* *'ctrl-p'* |
3 =============================================================================== | 3 =============================================================================== |
4 # # | 4 # # |
5 # :::::::: ::::::::::: ::::::::: ::: ::::::::: # | 5 # :::::::: ::::::::::: ::::::::: ::: ::::::::: # |
6 # :+: :+: :+: :+: :+: :+: :+: :+: # | 6 # :+: :+: :+: :+: :+: :+: :+: :+: # |
21 6. Extensions...................................|ctrlp-extensions| | 21 6. Extensions...................................|ctrlp-extensions| |
22 | 22 |
23 =============================================================================== | 23 =============================================================================== |
24 1. Intro *ctrlp-intro* | 24 1. Intro *ctrlp-intro* |
25 | 25 |
26 Full path fuzzy file, buffer and MRU file finder with an intuitive interface. | 26 Full path fuzzy file, buffer, mru and tag finder with an intuitive interface. |
27 Written in pure Vimscript for MacVim and Vim version 7.0+. Has full support for | 27 Written in pure Vimscript for MacVim and Vim version 7.0+. Has full support for |
28 Vim’s |regexp| as search pattern, built-in MRU monitoring, project’s root | 28 Vim’s |regexp| as search pattern, built-in MRU files monitoring, project’s root |
29 finder, and more. | 29 finder, and more. |
30 | 30 |
31 To enable optional extensions (tag, quickfix, dir...), see |ctrlp-extensions|. | 31 To enable optional extensions (tag, quickfix, dir...), see |ctrlp-extensions|. |
32 | 32 |
33 =============================================================================== | 33 =============================================================================== |
38 *'g:ctrlp_map'* | 38 *'g:ctrlp_map'* |
39 Use this option to change the mapping to invoke |CtrlP| in |Normal| mode: > | 39 Use this option to change the mapping to invoke |CtrlP| in |Normal| mode: > |
40 let g:ctrlp_map = '<c-p>' | 40 let g:ctrlp_map = '<c-p>' |
41 < | 41 < |
42 | 42 |
43 *'g:ctrlp_cmd'* | |
44 Set the default opening command to use when pressing the above mapping: > | |
45 let g:ctrlp_cmd = 'CtrlP' | |
46 < | |
47 | |
43 *'g:loaded_ctrlp'* | 48 *'g:loaded_ctrlp'* |
44 Use this option to disable the plugin completely: > | 49 Use this to disable the plugin completely: > |
45 let g:loaded_ctrlp = 1 | 50 let g:loaded_ctrlp = 1 |
46 < | 51 < |
47 | 52 |
48 *'g:ctrlp_by_filename'* | 53 *'g:ctrlp_by_filename'* |
49 Set this to 1 to set search by filename (not full path) as the default: > | 54 Set this to 1 to set search by filename (not full path) as the default: > |
70 Set the maximum height of the match window: > | 75 Set the maximum height of the match window: > |
71 let g:ctrlp_max_height = 10 | 76 let g:ctrlp_max_height = 10 |
72 < | 77 < |
73 | 78 |
74 *'g:ctrlp_jump_to_buffer'* | 79 *'g:ctrlp_jump_to_buffer'* |
75 Set this to 0 to disable the jump-to-open-buffer feature. Set to 2 to also jump | 80 Set this to 0 to disable the jump-to-open-buffer feature. |
76 tab if the selected buffer’s opened in another tab: > | 81 Set to 2 to also jump tab if the selected buffer’s opened in another tab. |
77 let g:ctrlp_jump_to_buffer = 1 | 82 Set to 1 to only jump to it if it’s opened in the current tab: > |
83 let g:ctrlp_jump_to_buffer = 2 | |
78 < | 84 < |
79 | 85 |
80 *'g:ctrlp_working_path_mode'* | 86 *'g:ctrlp_working_path_mode'* |
81 When starting up the prompt, temporarily set the working directory (i.e. the | 87 When starting up the prompt, temporarily set the working directory (i.e. the |
82 |current-directory|) to: | 88 |current-directory|) to: |
135 \ 'AcceptSelection("t")': ['<c-t>', '<MiddleMouse>'], | 141 \ 'AcceptSelection("t")': ['<c-t>', '<MiddleMouse>'], |
136 \ 'AcceptSelection("v")': ['<c-v>', '<c-q>', '<RightMouse>'], | 142 \ 'AcceptSelection("v")': ['<c-v>', '<c-q>', '<RightMouse>'], |
137 \ 'ToggleFocus()': ['<tab>'], | 143 \ 'ToggleFocus()': ['<tab>'], |
138 \ 'ToggleRegex()': ['<c-r>'], | 144 \ 'ToggleRegex()': ['<c-r>'], |
139 \ 'ToggleByFname()': ['<c-d>'], | 145 \ 'ToggleByFname()': ['<c-d>'], |
140 \ 'ToggleType(1)': ['<c-f>', '<c-up'], | 146 \ 'ToggleType(1)': ['<c-f>', '<c-up>'], |
141 \ 'ToggleType(-1)': ['<c-b>', '<c-down>'], | 147 \ 'ToggleType(-1)': ['<c-b>', '<c-down>'], |
142 \ 'PrtCurStart()': ['<c-a>'], | 148 \ 'PrtCurStart()': ['<c-a>'], |
143 \ 'PrtCurEnd()': ['<c-e>'], | 149 \ 'PrtCurEnd()': ['<c-e>'], |
144 \ 'PrtCurLeft()': ['<c-h>', '<left>'], | 150 \ 'PrtCurLeft()': ['<c-h>', '<left>'], |
145 \ 'PrtCurRight()': ['<c-l>', '<right>'], | 151 \ 'PrtCurRight()': ['<c-l>', '<right>'], |
190 | 196 |
191 *'g:ctrlp_dotfiles'* | 197 *'g:ctrlp_dotfiles'* |
192 Set this to 0 if you don’t want |CtrlP| to search for dotfiles and dotdirs: > | 198 Set this to 0 if you don’t want |CtrlP| to search for dotfiles and dotdirs: > |
193 let g:ctrlp_dotfiles = 1 | 199 let g:ctrlp_dotfiles = 1 |
194 < | 200 < |
195 You can also use |'wildignore'| to exclude anything from the search. | 201 You can use |'wildignore'| to exclude anything from the search. |
196 e.g. exclude version control directories from the results: > | 202 e.g. exclude version control directories: > |
197 set wildignore+=*/.git/*,*/.hg/*,*/.svn/* " Linux/MacOSX | 203 set wildignore+=*/.git/*,*/.hg/*,*/.svn/* " Linux/MacOSX |
198 set wildignore+=.git\*,.hg\*,.svn\* " Windows | 204 set wildignore+=.git\*,.hg\*,.svn\* " Windows |
199 < | 205 < |
200 Note: the `*/` in front of each dotfile glob is required for the dotfiles | 206 Note: the `*/` in front of each glob is required. |
201 search feature to work correctly along side with |wildignore|. If you’ve | |
202 disabled dotfiles search (set |g:ctrlp_dotfiles| to 0), then you can ignore | |
203 this. | |
204 | 207 |
205 Other note: |wildignore| influences the result of |expand()|, |globpath()| and | 208 Other note: |wildignore| influences the result of |expand()|, |globpath()| and |
206 |glob()| which many plugins use to find stuff on the system (e.g. fugitive.vim | 209 |glob()| which many plugins use to find stuff on the system (e.g. fugitive.vim |
207 looks for .git/, some other plugins look for external exe tools on Windows). | 210 looks for .git/, some other plugins look for external exe tools on Windows). |
208 So be a little mindful of what you put in your |wildignore|. | 211 So be a little mindful of what you put in your |wildignore|. |
212 | |
213 *'g:ctrlp_custom_ignore'* | |
214 In addition to |'wildignore'|, use this for files and directories you want only | |
215 |CtrlP| to not show. Use |regexp| to specify the pattern: > | |
216 let g:ctrlp_custom_ignore = '' | |
217 < | |
209 | 218 |
210 *'g:ctrlp_highlight_match'* | 219 *'g:ctrlp_highlight_match'* |
211 Use this to enable/disable highlighting of the matched patterns and to specify | 220 Use this to enable/disable highlighting of the matched patterns and to specify |
212 the highlight group that’ll be used: > | 221 the highlight group that’ll be used: > |
213 let g:ctrlp_highlight_match = [1, 'Identifier'] | 222 let g:ctrlp_highlight_match = [1, 'Identifier'] |
489 | 498 |
490 d) Type exactly two dots '..' at the start of the prompt and press enter to go | 499 d) Type exactly two dots '..' at the start of the prompt and press enter to go |
491 backward in the directory tree by 1 level. If the parent directory is | 500 backward in the directory tree by 1 level. If the parent directory is |
492 large, this might be slow. | 501 large, this might be slow. |
493 | 502 |
494 e) Similarly submit '/' or '\' to find and go to the project’s root. If the | 503 e) Similarly, submit '/' or '\' to find and go to the project’s root. If the |
495 project is large, using a VCS listing command to look for files might help | 504 project is large, using a VCS listing command to look for files might help |
496 speeding up the intial scan (see |g:ctrlp_user_command| for more details). | 505 speeding up the intial scan (see |g:ctrlp_user_command| for more details). |
497 | 506 |
498 f) Type the name of a non-existent file and press <c-y> to create it. | 507 f) Type the name of a non-existent file and press <c-y> to create it. |
499 e.g. 'parentdir/file.txt' will create a directory named 'parentdir' as well | 508 e.g. 'parentdir/file.txt' will create a directory named 'parentdir' as well |
505 =============================================================================== | 514 =============================================================================== |
506 6. Extensions *g:ctrlp-extensions* | 515 6. Extensions *g:ctrlp-extensions* |
507 | 516 |
508 Extensions are optional. To enable an extension, add its name to the variable | 517 Extensions are optional. To enable an extension, add its name to the variable |
509 g:ctrlp_extensions: > | 518 g:ctrlp_extensions: > |
510 let g:ctrlp_extensions = ['tag', 'quickfix', 'dir'] | 519 let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'dir'] |
511 < | 520 < |
512 The order of the items will be the order they appear on the statusline and when | 521 The order of the items will be the order they appear on the statusline and when |
513 using <c-f>, <c-b>. | 522 using <c-f>, <c-b>. |
514 | 523 |
515 Available extensions:~ | 524 Available extensions:~ |
519 - Name: 'tag' | 528 - Name: 'tag' |
520 - Command: ':CtrlPTag' | 529 - Command: ':CtrlPTag' |
521 - Search for a tag within a generated central tags file, and jump to the | 530 - Search for a tag within a generated central tags file, and jump to the |
522 definition. Use the Vim’s option |'tags'| to specify the names and the | 531 definition. Use the Vim’s option |'tags'| to specify the names and the |
523 locations of the tags file(s). Example: `set tags+=tags/help,doc/tags` | 532 locations of the tags file(s). Example: `set tags+=tags/help,doc/tags` |
533 | |
534 *:CtrlPBufTag* | |
535 * Buffer Tag mode:~ | |
536 - Name: 'buffertag' | |
537 - Command: ':CtrlPBufTag' | |
538 - Search for a tag within the current buffer and jump to the definition. | |
539 Requires |exuberant_ctags|. | |
524 | 540 |
525 *:CtrlPQuickfix* | 541 *:CtrlPQuickfix* |
526 * Quickfix mode:~ | 542 * Quickfix mode:~ |
527 - Name: 'quickfix' | 543 - Name: 'quickfix' |
528 - Command: ':CtrlPQuickfix' | 544 - Command: ':CtrlPQuickfix' |
538 + <c-t> change the global working directory (exit). | 554 + <c-t> change the global working directory (exit). |
539 + <c-v> change the local working directory for the current window (exit). | 555 + <c-v> change the local working directory for the current window (exit). |
540 + <c-x> change the global working directory to |CtrlP|’s current local | 556 + <c-x> change the global working directory to |CtrlP|’s current local |
541 working directory (exit). | 557 working directory (exit). |
542 | 558 |
559 ------------------------------------------------------------------------------- | |
560 Buffer Tag mode options:~ | |
561 | |
562 *'g:ctrlp_buftag_ctags_bin'* | |
563 If ctags isn’t in your $PATH, use this to set its location: > | |
564 let g:ctrlp_buftag_ctags_bin = '' | |
565 < | |
566 | |
567 *'g:ctrlp_buftag_systemenc'* | |
568 Match this with your OS’s encoding (not Vim’s). The default value mirrors Vim’s | |
569 global |'encoding'| option: > | |
570 let g:ctrlp_buftag_systemenc = &encoding | |
571 < | |
572 | |
573 *'g:ctrlp_buftag_types'* | |
574 Use this to set the arguments for ctags, jsctags... for a given filetype: > | |
575 let g:ctrlp_buftag_types = '' | |
576 < | |
577 Examples: > | |
578 let g:ctrlp_buftag_types = { | |
579 \ 'erlang' : '--language-force=erlang --erlang-types=drmf', | |
580 \ 'javascript' : { | |
581 \ 'bin': 'jsctags', | |
582 \ 'args': '-f -', | |
583 \ }, | |
584 \ } | |
585 < | |
586 | |
543 =============================================================================== | 587 =============================================================================== |
544 EXTENDING *ctrlp-extending* | 588 EXTENDING *ctrlp-extending* |
545 | 589 |
546 Extending |CtrlP| is very simple. Simply create a vim file following a short | 590 Extending |CtrlP| is very simple. Simply create a vim file following a short |
547 guidelines, place it in autoload/ctrlp/ and add its name to your .vimrc. | 591 guidelines, place it in autoload/ctrlp/ and add its name to your .vimrc. |
587 * Yasuhiro Matsumoto <github.com/mattn> | 631 * Yasuhiro Matsumoto <github.com/mattn> |
588 Added option to use Migemo for Japanese language. | 632 Added option to use Migemo for Japanese language. |
589 | 633 |
590 =============================================================================== | 634 =============================================================================== |
591 CHANGELOG *ctrlp-changelog* | 635 CHANGELOG *ctrlp-changelog* |
636 | |
637 + New feature: Buffer Tag extension. | |
638 + New command: |:CtrlPBufTag|. | |
639 + New options: |g:ctrlp_cmd|, | |
640 |g:ctrlp_custom_ignore| | |
592 | 641 |
593 Before 2011/11/30~ | 642 Before 2011/11/30~ |
594 | 643 |
595 + New features: Tag, Quickfix and Directory extensions. | 644 + New features: Tag, Quickfix and Directory extensions. |
596 + New commands: |:CtrlPTag|, |:CtrlPQuickfix|, |:CtrlPDir|. | 645 + New commands: |:CtrlPTag|, |:CtrlPQuickfix|, |:CtrlPDir|. |