2012-02-05 04:13:52 -05:00
|
|
|
|
*ctrlp.txt* Fuzzy file, buffer, mru and tag finder. v1.7.1
|
2011-08-21 22:14:00 -04:00
|
|
|
|
*CtrlP* *ControlP* *'ctrlp'* *'ctrl-p'*
|
|
|
|
|
===============================================================================
|
|
|
|
|
# #
|
|
|
|
|
# :::::::: ::::::::::: ::::::::: ::: ::::::::: #
|
|
|
|
|
# :+: :+: :+: :+: :+: :+: :+: :+: #
|
|
|
|
|
# +:+ +:+ +:+ +:+ +:+ +:+ +:+ #
|
|
|
|
|
# +#+ +#+ +#++:++#: +#+ +#++:++#+ #
|
|
|
|
|
# +#+ +#+ +#+ +#+ +#+ +#+ #
|
|
|
|
|
# #+# #+# #+# #+# #+# #+# #+# #
|
|
|
|
|
# ######## ### ### ### ########## ### #
|
|
|
|
|
# #
|
|
|
|
|
===============================================================================
|
|
|
|
|
CONTENTS *ctrlp-contents*
|
|
|
|
|
|
2011-11-02 19:09:12 -04:00
|
|
|
|
1. Intro........................................|ctrlp-intro|
|
|
|
|
|
2. Options......................................|ctrlp-options|
|
|
|
|
|
3. Commands.....................................|ctrlp-commands|
|
|
|
|
|
4. Mappings.....................................|ctrlp-mappings|
|
|
|
|
|
5. Input Formats................................|ctrlp-input-formats|
|
2011-11-28 07:52:28 -05:00
|
|
|
|
6. Extensions...................................|ctrlp-extensions|
|
2011-11-02 19:09:12 -04:00
|
|
|
|
|
2011-08-21 22:14:00 -04:00
|
|
|
|
===============================================================================
|
|
|
|
|
1. Intro *ctrlp-intro*
|
|
|
|
|
|
2011-12-17 21:58:44 -05:00
|
|
|
|
Full path fuzzy file, buffer, mru and tag finder with an intuitive interface.
|
2011-09-07 11:10:52 -04:00
|
|
|
|
Written in pure Vimscript for MacVim and Vim version 7.0+. Has full support for
|
2011-12-17 21:58:44 -05:00
|
|
|
|
Vim’s |regexp| as search pattern, built-in MRU files monitoring, project’s root
|
2011-11-04 11:35:26 -04:00
|
|
|
|
finder, and more.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
2012-01-28 12:29:09 -05:00
|
|
|
|
To enable optional extensions (tag, dir, rtscript...), see |ctrlp-extensions|.
|
2011-11-28 07:52:28 -05:00
|
|
|
|
|
2011-08-21 22:14:00 -04:00
|
|
|
|
===============================================================================
|
|
|
|
|
2. Options *ctrlp-options*
|
|
|
|
|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
Below are the available options and their default values:~
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
|
|
|
|
*'g:ctrlp_map'*
|
|
|
|
|
Use this option to change the mapping to invoke |CtrlP| in |Normal| mode: >
|
|
|
|
|
let g:ctrlp_map = '<c-p>'
|
|
|
|
|
<
|
|
|
|
|
|
2011-12-17 21:58:44 -05:00
|
|
|
|
*'g:ctrlp_cmd'*
|
|
|
|
|
Set the default opening command to use when pressing the above mapping: >
|
|
|
|
|
let g:ctrlp_cmd = 'CtrlP'
|
|
|
|
|
<
|
|
|
|
|
|
2011-08-21 22:14:00 -04:00
|
|
|
|
*'g:loaded_ctrlp'*
|
2011-12-17 21:58:44 -05:00
|
|
|
|
Use this to disable the plugin completely: >
|
2011-08-21 22:14:00 -04:00
|
|
|
|
let g:loaded_ctrlp = 1
|
|
|
|
|
<
|
|
|
|
|
|
2011-09-11 12:53:32 -04:00
|
|
|
|
*'g:ctrlp_by_filename'*
|
|
|
|
|
Set this to 1 to set search by filename (not full path) as the default: >
|
|
|
|
|
let g:ctrlp_by_filename = 0
|
|
|
|
|
<
|
|
|
|
|
|
|
|
|
|
*'g:ctrlp_regexp_search'*
|
2011-11-12 10:00:50 -05:00
|
|
|
|
Set this to 1 to set |regexp| search as the default: >
|
2011-09-11 12:53:32 -04:00
|
|
|
|
let g:ctrlp_regexp_search = 0
|
|
|
|
|
<
|
|
|
|
|
|
2011-10-08 22:30:16 -04:00
|
|
|
|
*'g:ctrlp_match_window_bottom'*
|
|
|
|
|
Set this to 0 to show the match window at the top of the screen: >
|
|
|
|
|
let g:ctrlp_match_window_bottom = 1
|
|
|
|
|
<
|
|
|
|
|
|
2011-08-21 22:14:00 -04:00
|
|
|
|
*'g:ctrlp_match_window_reversed'*
|
2012-01-17 11:13:39 -05:00
|
|
|
|
Change the listing order of the matched files in the match window. The default
|
|
|
|
|
setting (1) is from bottom to top: >
|
2011-08-21 22:14:00 -04:00
|
|
|
|
let g:ctrlp_match_window_reversed = 1
|
|
|
|
|
<
|
|
|
|
|
|
2011-10-02 16:04:43 -04:00
|
|
|
|
*'g:ctrlp_max_height'*
|
|
|
|
|
Set the maximum height of the match window: >
|
|
|
|
|
let g:ctrlp_max_height = 10
|
|
|
|
|
<
|
|
|
|
|
|
2011-10-22 06:19:04 -04:00
|
|
|
|
*'g:ctrlp_jump_to_buffer'*
|
2012-01-28 12:29:09 -05:00
|
|
|
|
When opening a file with <cr> or <c-t>, if the file's already opened somewhere
|
|
|
|
|
|CtrlP| will try to jump to it instead of opening a new instance: >
|
2011-12-17 21:58:44 -05:00
|
|
|
|
let g:ctrlp_jump_to_buffer = 2
|
2011-10-22 06:19:04 -04:00
|
|
|
|
<
|
2012-01-12 21:13:39 -05:00
|
|
|
|
1 - only jump to the buffer if it’s opened in the current tab.
|
|
|
|
|
2 - jump tab as well if the buffer's opened in another tab.
|
|
|
|
|
0 - disable this feature.
|
2011-10-22 06:19:04 -04:00
|
|
|
|
|
2011-08-21 22:14:00 -04:00
|
|
|
|
*'g:ctrlp_working_path_mode'*
|
2012-01-28 12:29:09 -05:00
|
|
|
|
When starting up, |CtrlP| sets its local working directory according to this
|
|
|
|
|
variable: >
|
|
|
|
|
let g:ctrlp_working_path_mode = 2
|
|
|
|
|
<
|
2011-08-21 22:14:00 -04:00
|
|
|
|
1 - the parent directory of the current file.
|
|
|
|
|
2 - the nearest ancestor that contains one of these directories/files:
|
|
|
|
|
.git/
|
|
|
|
|
.hg/
|
|
|
|
|
.bzr/
|
|
|
|
|
_darcs/
|
|
|
|
|
root.dir
|
|
|
|
|
0 - don’t manage working directory.
|
|
|
|
|
|
2011-09-06 09:03:31 -04:00
|
|
|
|
*'g:ctrlp_root_markers'*
|
2011-11-12 10:00:50 -05:00
|
|
|
|
Use this to set your own root markers in addition to the default ones. Your
|
|
|
|
|
markers will take precedence: >
|
2011-09-06 09:03:31 -04:00
|
|
|
|
let g:ctrlp_root_markers = ['']
|
|
|
|
|
<
|
2011-11-22 01:38:26 -05:00
|
|
|
|
These markers (builtins and yours) will serve as identifiers for the '/' and
|
2012-01-28 12:29:09 -05:00
|
|
|
|
'\' special inputs (section 5.e).
|
2011-09-06 09:03:31 -04:00
|
|
|
|
|
2011-09-10 08:51:49 -04:00
|
|
|
|
*'g:ctrlp_use_caching'*
|
2011-09-10 14:54:07 -04:00
|
|
|
|
Set this to 0 to disable per-session caching. When disabled, caching will still
|
|
|
|
|
be enabled for directories that have more than 4000 files: >
|
2011-09-10 08:51:49 -04:00
|
|
|
|
let g:ctrlp_use_caching = 1
|
|
|
|
|
<
|
2011-10-23 06:38:03 -04:00
|
|
|
|
Note: you can quickly purge the cache by pressing <F5> while inside |CtrlP|.
|
2011-09-10 14:54:07 -04:00
|
|
|
|
|
|
|
|
|
*'g:ctrlp_clear_cache_on_exit'*
|
2012-01-28 12:29:09 -05:00
|
|
|
|
Set this to 0 to enable cross-session caching by not deleting the cache files
|
2012-01-09 17:58:59 -05:00
|
|
|
|
upon exiting Vim: >
|
2011-09-10 14:54:07 -04:00
|
|
|
|
let g:ctrlp_clear_cache_on_exit = 1
|
|
|
|
|
<
|
2011-09-10 08:51:49 -04:00
|
|
|
|
|
2011-08-21 22:14:00 -04:00
|
|
|
|
*'g:ctrlp_cache_dir'*
|
2011-11-14 01:58:09 -05:00
|
|
|
|
Set the directory to store the cache files: >
|
2012-01-22 10:51:08 -05:00
|
|
|
|
let g:ctrlp_cache_dir = $HOME.'/.cache/ctrlp'
|
2011-08-21 22:14:00 -04:00
|
|
|
|
<
|
|
|
|
|
|
|
|
|
|
*'g:ctrlp_prompt_mappings'*
|
|
|
|
|
Use this to customize the mappings inside |CtrlP|’s prompt to your liking. You
|
|
|
|
|
only need to keep the lines that you’ve changed the values (inside []): >
|
|
|
|
|
let g:ctrlp_prompt_mappings = {
|
2012-01-06 01:22:55 -05:00
|
|
|
|
\ 'PrtBS()': ['<bs>', '<c-]>'],
|
2011-10-07 10:10:14 -04:00
|
|
|
|
\ 'PrtDelete()': ['<del>'],
|
|
|
|
|
\ 'PrtDeleteWord()': ['<c-w>'],
|
|
|
|
|
\ 'PrtClear()': ['<c-u>'],
|
|
|
|
|
\ 'PrtSelectMove("j")': ['<c-j>', '<down>'],
|
|
|
|
|
\ 'PrtSelectMove("k")': ['<c-k>', '<up>'],
|
|
|
|
|
\ 'PrtHistory(-1)': ['<c-n>'],
|
|
|
|
|
\ 'PrtHistory(1)': ['<c-p>'],
|
2012-01-30 11:03:30 -05:00
|
|
|
|
\ 'AcceptSelection("e")': ['<cr>', '<2-LeftMouse>'],
|
2011-10-07 10:10:14 -04:00
|
|
|
|
\ 'AcceptSelection("h")': ['<c-x>', '<c-cr>', '<c-s>'],
|
2011-11-12 10:00:50 -05:00
|
|
|
|
\ 'AcceptSelection("t")': ['<c-t>', '<MiddleMouse>'],
|
2012-01-06 01:22:55 -05:00
|
|
|
|
\ 'AcceptSelection("v")': ['<c-v>', '<RightMouse>'],
|
2012-01-16 08:14:09 -05:00
|
|
|
|
\ 'ToggleFocus()': ['<s-tab>'],
|
2011-10-07 10:10:14 -04:00
|
|
|
|
\ 'ToggleRegex()': ['<c-r>'],
|
|
|
|
|
\ 'ToggleByFname()': ['<c-d>'],
|
2011-12-18 17:20:51 -05:00
|
|
|
|
\ 'ToggleType(1)': ['<c-f>', '<c-up>'],
|
2011-10-07 10:10:14 -04:00
|
|
|
|
\ 'ToggleType(-1)': ['<c-b>', '<c-down>'],
|
2012-01-30 11:03:30 -05:00
|
|
|
|
\ 'PrtExpandDir()': ['<tab>'],
|
2012-01-29 20:54:06 -05:00
|
|
|
|
\ 'PrtInsert("w")': ['<F2>', '<insert>'],
|
2012-01-06 01:22:55 -05:00
|
|
|
|
\ 'PrtInsert("s")': ['<F3>'],
|
|
|
|
|
\ 'PrtInsert("v")': ['<F4>'],
|
|
|
|
|
\ 'PrtInsert("+")': ['<F6>'],
|
2011-10-07 10:10:14 -04:00
|
|
|
|
\ 'PrtCurStart()': ['<c-a>'],
|
|
|
|
|
\ 'PrtCurEnd()': ['<c-e>'],
|
2012-01-06 01:22:55 -05:00
|
|
|
|
\ 'PrtCurLeft()': ['<c-h>', '<left>', '<c-^>'],
|
2011-10-07 10:10:14 -04:00
|
|
|
|
\ 'PrtCurRight()': ['<c-l>', '<right>'],
|
|
|
|
|
\ 'PrtClearCache()': ['<F5>'],
|
2011-11-28 07:52:28 -05:00
|
|
|
|
\ 'PrtDeleteMRU()': ['<F7>'],
|
2011-10-07 10:10:14 -04:00
|
|
|
|
\ 'CreateNewFile()': ['<c-y>'],
|
|
|
|
|
\ 'MarkToOpen()': ['<c-z>'],
|
|
|
|
|
\ 'OpenMulti()': ['<c-o>'],
|
|
|
|
|
\ 'PrtExit()': ['<esc>', '<c-c>', '<c-g>'],
|
2011-08-21 22:14:00 -04:00
|
|
|
|
\ }
|
|
|
|
|
<
|
2012-01-06 01:22:55 -05:00
|
|
|
|
Note: In some terminals, it’s not possible to remap <c-h> without also changing
|
2012-01-28 12:29:09 -05:00
|
|
|
|
<bs> (|key-codes|). So if pressing <bs> moves the cursor to the left instead of
|
|
|
|
|
deleting a char for you, add this to your |vimrc| to change the default <c-h>
|
|
|
|
|
mapping: >
|
2012-01-06 01:22:55 -05:00
|
|
|
|
let g:ctrlp_prompt_mappings = {
|
|
|
|
|
\ 'PrtBS()': ['<bs>', '<c-]>', '<c-h>'],
|
|
|
|
|
\ 'PrtCurLeft()': ['<left>', '<c-^>'],
|
|
|
|
|
\ }
|
2011-12-13 09:42:57 -05:00
|
|
|
|
<
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
2011-09-07 10:41:43 -04:00
|
|
|
|
*'g:ctrlp_mruf_max'*
|
|
|
|
|
Specify the number of recently opened files you want |CtrlP| to remember: >
|
2011-11-28 07:52:28 -05:00
|
|
|
|
let g:ctrlp_mruf_max = 250
|
2011-09-07 10:41:43 -04:00
|
|
|
|
<
|
|
|
|
|
|
|
|
|
|
*'g:ctrlp_mruf_exclude'*
|
2012-01-17 11:13:39 -05:00
|
|
|
|
Files you don’t want |CtrlP| to remember. Use |regexp| to specify the patterns:
|
2011-09-07 10:41:43 -04:00
|
|
|
|
>
|
|
|
|
|
let g:ctrlp_mruf_exclude = ''
|
|
|
|
|
<
|
|
|
|
|
Examples: >
|
|
|
|
|
let g:ctrlp_mruf_exclude = '/tmp/.*\|/temp/.*' " MacOSX/Linux
|
|
|
|
|
let g:ctrlp_mruf_exclude = '^C:\\dev\\tmp\\.*' " Windows
|
|
|
|
|
<
|
|
|
|
|
|
|
|
|
|
*'g:ctrlp_mruf_include'*
|
|
|
|
|
And if you want |CtrlP| to only remember some files, specify them here: >
|
|
|
|
|
let g:ctrlp_mruf_include = ''
|
|
|
|
|
<
|
|
|
|
|
Example: >
|
2011-09-07 17:01:08 -04:00
|
|
|
|
let g:ctrlp_mruf_include = '\.py$\|\.rb$'
|
2011-09-07 10:41:43 -04:00
|
|
|
|
<
|
|
|
|
|
|
2012-01-15 12:42:14 -05:00
|
|
|
|
*'g:ctrlp_mruf_relative'*
|
|
|
|
|
Set this to 1 to show only MRU files in the current working directory: >
|
|
|
|
|
let g:ctrlp_mruf_relative = 0
|
|
|
|
|
<
|
|
|
|
|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
*'g:ctrlp_mruf_case_sensitive'*
|
|
|
|
|
Match this with your file system case-sensitivity setting to avoid duplicate
|
|
|
|
|
MRU entries: >
|
|
|
|
|
let g:ctrlp_mruf_case_sensitive = 1
|
|
|
|
|
<
|
|
|
|
|
|
2012-01-17 11:13:39 -05:00
|
|
|
|
*'g:ctrlp_mruf_last_entered'*
|
|
|
|
|
Set to 1 to sort the MRU file list to most-recently-entered-buffer order: >
|
|
|
|
|
let g:ctrlp_mruf_last_entered = 0
|
|
|
|
|
<
|
|
|
|
|
|
2011-09-09 20:32:08 -04:00
|
|
|
|
*'g:ctrlp_dotfiles'*
|
2011-09-11 12:53:32 -04:00
|
|
|
|
Set this to 0 if you don’t want |CtrlP| to search for dotfiles and dotdirs: >
|
2011-09-09 20:32:08 -04:00
|
|
|
|
let g:ctrlp_dotfiles = 1
|
|
|
|
|
<
|
2011-12-17 21:58:44 -05:00
|
|
|
|
You can use |'wildignore'| to exclude anything from the search.
|
2012-01-28 12:29:09 -05:00
|
|
|
|
Examples: >
|
|
|
|
|
" Excluding version control directories
|
2011-09-13 13:17:20 -04:00
|
|
|
|
set wildignore+=*/.git/*,*/.hg/*,*/.svn/* " Linux/MacOSX
|
|
|
|
|
set wildignore+=.git\*,.hg\*,.svn\* " Windows
|
2011-09-11 18:49:42 -04:00
|
|
|
|
<
|
2012-01-12 21:13:39 -05:00
|
|
|
|
Note #1: the `*/` in front of each directory glob is required.
|
2011-09-09 20:32:08 -04:00
|
|
|
|
|
2012-01-06 01:22:55 -05:00
|
|
|
|
Note #2: |wildignore| influences the result of |expand()|, |globpath()| and
|
2011-10-19 17:09:44 -04:00
|
|
|
|
|glob()| which many plugins use to find stuff on the system (e.g. fugitive.vim
|
2012-01-28 12:29:09 -05:00
|
|
|
|
looks for .git/, some other plugins look for external .exe tools on Windows).
|
2011-10-22 10:57:29 -04:00
|
|
|
|
So be a little mindful of what you put in your |wildignore|.
|
2011-10-19 16:58:28 -04:00
|
|
|
|
|
2011-12-17 21:58:44 -05:00
|
|
|
|
*'g:ctrlp_custom_ignore'*
|
|
|
|
|
In addition to |'wildignore'|, use this for files and directories you want only
|
2012-01-06 01:22:55 -05:00
|
|
|
|
|CtrlP| to not show. Use |regexp| to specify the patterns: >
|
2011-12-17 21:58:44 -05:00
|
|
|
|
let g:ctrlp_custom_ignore = ''
|
|
|
|
|
<
|
2012-01-06 01:22:55 -05:00
|
|
|
|
Examples: >
|
|
|
|
|
let g:ctrlp_custom_ignore = '\.git$\|\.hg$\|\.svn$'
|
|
|
|
|
let g:ctrlp_custom_ignore = {
|
|
|
|
|
\ 'dir': '\.git$\|\.hg$\|\.svn$',
|
|
|
|
|
\ 'file': '\.exe$\|\.so$\|\.dll$',
|
2012-01-29 20:54:06 -05:00
|
|
|
|
\ 'link': 'SOME_BAD_SYMBOLIC_LINKS',
|
2012-01-06 01:22:55 -05:00
|
|
|
|
\ }
|
2012-01-17 11:13:39 -05:00
|
|
|
|
<
|
2011-12-17 21:58:44 -05:00
|
|
|
|
|
2011-09-11 12:53:32 -04:00
|
|
|
|
*'g:ctrlp_highlight_match'*
|
|
|
|
|
Use this to enable/disable highlighting of the matched patterns and to specify
|
|
|
|
|
the highlight group that’ll be used: >
|
2011-10-07 10:10:14 -04:00
|
|
|
|
let g:ctrlp_highlight_match = [1, 'Identifier']
|
2011-09-11 12:53:32 -04:00
|
|
|
|
<
|
|
|
|
|
|
2011-09-14 10:38:37 -04:00
|
|
|
|
*'g:ctrlp_max_files'*
|
|
|
|
|
The maximum number of files to scan, set to 0 for no limit: >
|
2012-01-30 11:03:30 -05:00
|
|
|
|
let g:ctrlp_max_files = 10000
|
2011-09-14 10:38:37 -04:00
|
|
|
|
<
|
|
|
|
|
|
2011-09-18 07:33:37 -04:00
|
|
|
|
*'g:ctrlp_max_depth'*
|
|
|
|
|
The maximum depth of a directory tree to recurse into: >
|
|
|
|
|
let g:ctrlp_max_depth = 40
|
|
|
|
|
<
|
2011-11-02 19:09:12 -04:00
|
|
|
|
Note: the larger these values, the more memory Vim uses.
|
2011-09-18 07:33:37 -04:00
|
|
|
|
|
2011-09-11 12:53:32 -04:00
|
|
|
|
*'g:ctrlp_user_command'*
|
2012-01-28 12:29:09 -05:00
|
|
|
|
Specify an external tool to use for listing files instead of using Vim’s
|
|
|
|
|
|globpath()|. Use %s in place of the target directory: >
|
2011-09-11 12:53:32 -04:00
|
|
|
|
let g:ctrlp_user_command = ''
|
|
|
|
|
<
|
|
|
|
|
Examples: >
|
2011-09-11 17:26:18 -04:00
|
|
|
|
let g:ctrlp_user_command = 'find %s -type f' " MacOSX/Linux
|
|
|
|
|
let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d' " Windows
|
|
|
|
|
<
|
|
|
|
|
You can also use 'grep', 'findstr' or something else to filter the results.
|
|
|
|
|
Examples: >
|
|
|
|
|
let g:ctrlp_user_command = 'find %s -type f | grep (?!tmp/.*)'
|
|
|
|
|
let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d | findstr .*\.py$'
|
2011-09-11 12:53:32 -04:00
|
|
|
|
<
|
2012-01-12 21:13:39 -05:00
|
|
|
|
Use a version control listing command when inside a repository, this is faster
|
|
|
|
|
when scanning large projects: >
|
2012-01-29 20:54:06 -05:00
|
|
|
|
let g:ctrlp_user_command = [root_marker, listing_command, fallback_command]
|
|
|
|
|
let g:ctrlp_user_command = {
|
|
|
|
|
\ 'types': {
|
|
|
|
|
\ 1: [root_marker_1, listing_command_1],
|
|
|
|
|
\ n: [root_marker_n, listing_command_n],
|
|
|
|
|
\ },
|
|
|
|
|
\ 'fallback': fallback_command
|
|
|
|
|
\ }
|
2011-10-08 15:26:36 -04:00
|
|
|
|
<
|
2011-11-22 01:38:26 -05:00
|
|
|
|
Examples: >
|
2011-10-08 15:26:36 -04:00
|
|
|
|
let g:ctrlp_user_command = ['.git/', 'cd %s && git ls-files']
|
2012-01-06 01:22:55 -05:00
|
|
|
|
let g:ctrlp_user_command = ['.hg/', 'hg --cwd %s locate -I .']
|
2012-01-29 20:54:06 -05:00
|
|
|
|
let g:ctrlp_user_command = {
|
|
|
|
|
\ 'types': {
|
|
|
|
|
\ 1: ['.git/', 'cd %s && git ls-files'],
|
|
|
|
|
\ 2: ['.hg/', 'hg --cwd %s locate -I .'],
|
|
|
|
|
\ },
|
|
|
|
|
\ 'fallback': 'find %s -type f'
|
|
|
|
|
\ }
|
2011-10-08 15:26:36 -04:00
|
|
|
|
<
|
2012-01-29 20:54:06 -05:00
|
|
|
|
If the fallback_command is empty or not defined, |globpath()| will then be used
|
|
|
|
|
when searching outside a repo.
|
2011-09-11 12:53:32 -04:00
|
|
|
|
|
2011-09-29 08:15:33 -04:00
|
|
|
|
*'g:ctrlp_max_history'*
|
|
|
|
|
The maximum number of input strings you want |CtrlP| to remember. The default
|
2011-11-28 07:52:28 -05:00
|
|
|
|
value mirrors Vim’s global |'history'| option: >
|
2011-09-29 08:15:33 -04:00
|
|
|
|
let g:ctrlp_max_history = &history
|
|
|
|
|
<
|
2012-01-09 17:58:59 -05:00
|
|
|
|
Set to 0 to disable prompt’s history. Browse the history with <c-n> and <c-p>.
|
2011-10-02 16:04:43 -04:00
|
|
|
|
|
2012-01-12 21:13:39 -05:00
|
|
|
|
*'g:ctrlp_open_new_file'*
|
|
|
|
|
Use this option to specify how the newly created file is to be opened when
|
|
|
|
|
pressing <c-y>:
|
|
|
|
|
t - in a new tab
|
|
|
|
|
h - in a new horizontal split
|
|
|
|
|
v - in a new vertical split
|
|
|
|
|
r - in the current window
|
|
|
|
|
>
|
|
|
|
|
let g:ctrlp_open_new_file = 'v'
|
|
|
|
|
<
|
|
|
|
|
|
2011-10-02 16:04:43 -04:00
|
|
|
|
*'g:ctrlp_open_multi'*
|
2011-11-12 10:00:50 -05:00
|
|
|
|
If non-zero, this will enable opening multiple files with <c-z> and <c-o>: >
|
|
|
|
|
let g:ctrlp_open_multi = '1v'
|
|
|
|
|
<
|
|
|
|
|
For the number:
|
2012-01-12 22:42:15 -05:00
|
|
|
|
- If bigger than 1, it’ll be used as the maximum number of windows or tabs to
|
2012-01-13 11:02:17 -05:00
|
|
|
|
create when opening the files (the rest will be hidden buffers).
|
2012-01-12 22:42:15 -05:00
|
|
|
|
- If is 1, <c-o> will open all files, each in a new window or new tab.
|
|
|
|
|
- If no number is given, only the first file will be opened in a window,
|
|
|
|
|
either new window or reused, and the rest will be hidden buffers.
|
2012-01-13 11:02:17 -05:00
|
|
|
|
For the letters:
|
|
|
|
|
t - each in a new tab
|
|
|
|
|
h - each in a new horizontal split
|
|
|
|
|
v - each in a new vertical split
|
|
|
|
|
Reuse the current window:
|
2012-01-12 21:13:39 -05:00
|
|
|
|
tr,
|
|
|
|
|
hr,
|
|
|
|
|
vr - open the first file in the current window, then the remaining files in
|
|
|
|
|
new splits or new tabs just like with t, h, v.
|
|
|
|
|
|
|
|
|
|
*'g:ctrlp_arg_map'*
|
|
|
|
|
When this is set to 1, the <c-o> and <c-y> mappings will accept one extra key
|
|
|
|
|
as an argument to override their default behavior: >
|
|
|
|
|
let g:ctrlp_arg_map = 0
|
|
|
|
|
<
|
|
|
|
|
Pressing <c-o> or <c-y> will then prompt for a keypress. The key can be:
|
|
|
|
|
t - open in tab(s)
|
|
|
|
|
h - open in horizontal split(s)
|
|
|
|
|
v - open in vertical split(s)
|
|
|
|
|
r - open in current window (for <c-y> only)
|
2012-01-28 12:29:09 -05:00
|
|
|
|
<esc>, <c-c> - cancel and go back to the prompt.
|
2012-01-13 11:02:17 -05:00
|
|
|
|
Any other key - use the behavior specified with |g:ctrlp_open_new_file| and
|
|
|
|
|
|g:ctrlp_open_multi|.
|
2011-09-29 08:15:33 -04:00
|
|
|
|
|
2011-11-09 06:07:54 -05:00
|
|
|
|
*'g:ctrlp_dont_split'*
|
|
|
|
|
When opening a file with <cr>, |CtrlP| avoids opening it in windows created by
|
2011-11-12 10:00:50 -05:00
|
|
|
|
plugins, help and quickfix. Use this to setup some exceptions: >
|
2012-01-12 21:13:39 -05:00
|
|
|
|
let g:ctrlp_dont_split = 'netrw'
|
2011-11-09 06:07:54 -05:00
|
|
|
|
<
|
2011-11-12 10:00:50 -05:00
|
|
|
|
Acceptable values are partial names or filetypes of the special buffers. Use
|
|
|
|
|
|regexp| to specify the pattern. Example: >
|
2012-01-12 21:13:39 -05:00
|
|
|
|
let g:ctrlp_dont_split = 'netrw\|help\|quickfix'
|
2011-11-09 06:07:54 -05:00
|
|
|
|
<
|
|
|
|
|
|
2011-11-22 01:38:26 -05:00
|
|
|
|
*'g:ctrlp_follow_symlinks'*
|
|
|
|
|
Set this to 1 to follow symbolic links when listing files: >
|
|
|
|
|
let g:ctrlp_follow_symlinks = 0
|
|
|
|
|
<
|
2012-01-22 07:20:27 -05:00
|
|
|
|
When enabled, looped internal symlinks will be ignored to avoid duplicates.
|
2011-11-22 01:38:26 -05:00
|
|
|
|
|
2011-11-28 07:52:28 -05:00
|
|
|
|
*'g:ctrlp_lazy_update'*
|
|
|
|
|
Set this to 1 to enable the lazy-update feature: only update the match window
|
|
|
|
|
after typing’s been stopped for a certain amount of time: >
|
|
|
|
|
let g:ctrlp_lazy_update = 0
|
|
|
|
|
<
|
|
|
|
|
If is 1, update after 250ms. If bigger than 1, the number will be used as the
|
|
|
|
|
delay time in milliseconds.
|
|
|
|
|
|
2011-11-29 23:11:14 -05:00
|
|
|
|
*'g:ctrlp_use_migemo'*
|
2011-12-01 04:36:21 -05:00
|
|
|
|
Set this to 1 to use Migemo Pattern for Japanese filenames. Migemo Search only
|
2011-11-30 04:16:08 -05:00
|
|
|
|
works in |regexp| mode. To split the pattern, separate words with space: >
|
2011-11-29 23:11:14 -05:00
|
|
|
|
let g:ctrlp_use_migemo = 0
|
|
|
|
|
<
|
|
|
|
|
|
2012-01-14 04:53:42 -05:00
|
|
|
|
*'g:ctrlp_status_func'*
|
2012-01-15 12:42:14 -05:00
|
|
|
|
Use this to customize the statuslines for the |CtrlP| window: >
|
2012-01-14 04:53:42 -05:00
|
|
|
|
let g:ctrlp_status_func = {}
|
|
|
|
|
<
|
|
|
|
|
Example: >
|
|
|
|
|
let g:ctrlp_status_func = {
|
2012-01-15 12:42:14 -05:00
|
|
|
|
\ 'main': 'Function_Name_1',
|
|
|
|
|
\ 'prog': 'Function_Name_2',
|
2012-01-14 04:53:42 -05:00
|
|
|
|
\ }
|
|
|
|
|
<
|
|
|
|
|
See https://gist.github.com/1610859 for a working example.
|
|
|
|
|
|
2011-08-21 22:14:00 -04:00
|
|
|
|
===============================================================================
|
|
|
|
|
3. Commands *ctrlp-commands*
|
|
|
|
|
|
|
|
|
|
*:CtrlP*
|
2011-09-11 17:26:18 -04:00
|
|
|
|
:CtrlP [starting-directory]
|
2011-11-28 07:52:28 -05:00
|
|
|
|
Open |CtrlP| in find file mode.
|
|
|
|
|
|
2011-09-11 12:53:32 -04:00
|
|
|
|
If no argument is given, the value of |g:ctrlp_working_path_mode| will be
|
2011-09-12 21:27:27 -04:00
|
|
|
|
used to determine the starting directory.
|
2011-11-02 19:09:12 -04:00
|
|
|
|
You can use <tab> to auto-complete the [starting-directory] when typing it.
|
2011-09-07 10:41:43 -04:00
|
|
|
|
|
2011-09-05 07:05:04 -04:00
|
|
|
|
*:CtrlPBuffer*
|
|
|
|
|
:CtrlPBuffer
|
2011-11-28 07:52:28 -05:00
|
|
|
|
Open |CtrlP| in find buffer mode.
|
2011-09-07 10:41:43 -04:00
|
|
|
|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
*:CtrlPMRU*
|
|
|
|
|
:CtrlPMRU
|
2011-11-28 07:52:28 -05:00
|
|
|
|
Open |CtrlP| in find Most-Recently-Used file mode.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
|
|
|
|
*:ClearCtrlPCache*
|
|
|
|
|
:ClearCtrlPCache
|
2011-11-12 10:00:50 -05:00
|
|
|
|
Flush the cache for the current working directory. The same as pressing <F5>
|
2011-11-02 19:09:12 -04:00
|
|
|
|
inside |CtrlP|.
|
2012-01-28 12:29:09 -05:00
|
|
|
|
You can also enable/disable caching with the option |g:ctrlp_use_caching|.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
|
|
|
|
*:ClearAllCtrlPCaches*
|
|
|
|
|
:ClearAllCtrlPCaches
|
2012-01-28 12:29:09 -05:00
|
|
|
|
Delete all the cache files saved in |g:ctrlp_cache_dir|.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
2011-09-18 07:33:37 -04:00
|
|
|
|
*:ResetCtrlP*
|
|
|
|
|
:ResetCtrlP
|
2012-01-15 12:42:14 -05:00
|
|
|
|
Reset all options and take in new values of the option variables.
|
2011-09-18 07:33:37 -04:00
|
|
|
|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
|
The following commands ignore the current value of |g:ctrlp_working_path_mode|:
|
2011-09-11 12:53:32 -04:00
|
|
|
|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
:CtrlPCurWD *:CtrlPCurWD*
|
2011-11-04 11:35:26 -04:00
|
|
|
|
This acts like |:CtrlP| with |path_mode| = 0
|
2011-09-08 14:25:01 -04:00
|
|
|
|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
:CtrlPCurFile *:CtrlPCurFile*
|
2011-11-04 11:35:26 -04:00
|
|
|
|
This acts like |:CtrlP| with |path_mode| = 1
|
2011-09-08 14:16:12 -04:00
|
|
|
|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
:CtrlPRoot *:CtrlPRoot*
|
2011-11-04 11:35:26 -04:00
|
|
|
|
This acts like |:CtrlP| with |path_mode| = 2
|
2011-09-08 14:16:12 -04:00
|
|
|
|
|
2011-08-21 22:14:00 -04:00
|
|
|
|
===============================================================================
|
|
|
|
|
4. Mappings *ctrlp-mappings*
|
|
|
|
|
|
|
|
|
|
*'ctrlp-<c-p>'*
|
|
|
|
|
<c-p>
|
2011-11-28 07:52:28 -05:00
|
|
|
|
Default |Normal| mode mapping to open the |CtrlP| prompt in find file mode.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
Once inside the prompt:~
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
|
|
|
|
<c-r> *'ctrlp-fullregexp'*
|
2011-09-12 21:27:27 -04:00
|
|
|
|
Toggle between the string mode (section 5.a & b) and full |regexp| mode.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
(note: in full |regexp| mode, the prompt’s base is 'r>>' instead of '>>>')
|
|
|
|
|
|
2012-01-15 12:42:14 -05:00
|
|
|
|
See also |input-formats| (guide) and |g:ctrlp_regexp_search| (option).
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
|
|
|
|
<c-d>
|
2012-01-28 12:29:09 -05:00
|
|
|
|
Toggle between full-path search and filename only search.
|
2011-09-05 10:59:18 -04:00
|
|
|
|
(note: in filename mode, the prompt’s base is '>d>' instead of '>>>')
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
2011-09-07 10:41:43 -04:00
|
|
|
|
<c-f>, 'forward'
|
|
|
|
|
<c-up>
|
2011-11-28 07:52:28 -05:00
|
|
|
|
Scroll to the 'next' search mode in the sequence.
|
2011-09-07 10:41:43 -04:00
|
|
|
|
|
|
|
|
|
<c-b>, 'backward'
|
|
|
|
|
<c-down>
|
2011-11-28 07:52:28 -05:00
|
|
|
|
Scroll to the 'previous' search mode in the sequence.
|
2011-09-05 07:05:04 -04:00
|
|
|
|
|
2011-09-05 10:59:18 -04:00
|
|
|
|
<tab>
|
2012-01-16 08:14:09 -05:00
|
|
|
|
Auto-complete directory names under the current working directory inside
|
|
|
|
|
the prompt.
|
|
|
|
|
|
|
|
|
|
<s-tab>
|
2011-09-05 10:59:18 -04:00
|
|
|
|
Toggle the focus between the match window and the prompt.
|
|
|
|
|
|
2011-08-21 22:14:00 -04:00
|
|
|
|
<c-j>,
|
|
|
|
|
<down>
|
2012-01-23 21:13:51 -05:00
|
|
|
|
Move selection down.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
|
|
|
|
<c-k>,
|
|
|
|
|
<up>
|
2012-01-23 21:13:51 -05:00
|
|
|
|
Move selection up.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
|
|
|
|
<c-a>
|
2012-01-23 21:13:51 -05:00
|
|
|
|
Move the cursor to the 'start' of the prompt.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
|
|
|
|
<c-e>
|
2012-01-23 21:13:51 -05:00
|
|
|
|
Move the cursor to the 'end' of the prompt.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
|
|
|
|
<c-h>,
|
2012-01-06 01:22:55 -05:00
|
|
|
|
<left>,
|
|
|
|
|
<c-^>
|
2012-01-23 21:13:51 -05:00
|
|
|
|
Move the cursor one character to the 'left'.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
|
|
|
|
<c-l>,
|
|
|
|
|
<right>
|
2012-01-23 21:13:51 -05:00
|
|
|
|
Move the cursor one character to the 'right'.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
2012-01-06 01:22:55 -05:00
|
|
|
|
<c-]>,
|
|
|
|
|
<bs>
|
2012-01-23 21:13:51 -05:00
|
|
|
|
Delete the preceding character.
|
2012-01-06 01:22:55 -05:00
|
|
|
|
|
|
|
|
|
<del>
|
2012-01-23 21:13:51 -05:00
|
|
|
|
Delete the current character.
|
2012-01-06 01:22:55 -05:00
|
|
|
|
|
2011-08-21 22:14:00 -04:00
|
|
|
|
<c-w>
|
2012-01-23 21:13:51 -05:00
|
|
|
|
Delete a preceding inner word.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
|
|
|
|
<c-u>
|
2012-01-23 21:13:51 -05:00
|
|
|
|
Clear the input field.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
|
|
|
|
<cr>
|
2011-11-28 07:52:28 -05:00
|
|
|
|
Open selected file in the active window if possible.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
|
|
|
|
<c-t>
|
2012-01-23 21:13:51 -05:00
|
|
|
|
Open selected file in a new 'tab' after the last tabpage.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
|
|
|
|
<c-v>
|
2012-01-23 21:13:51 -05:00
|
|
|
|
Open selected file in a 'vertical' split.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
|
|
|
|
<c-cr>,
|
2011-09-28 09:42:52 -04:00
|
|
|
|
<c-s>,
|
|
|
|
|
<c-x>
|
2012-01-23 21:13:51 -05:00
|
|
|
|
Open selected file in a 'horizontal' split.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
2011-09-28 10:53:55 -04:00
|
|
|
|
<c-y>
|
|
|
|
|
Create a new file and its parent directories.
|
|
|
|
|
|
2011-09-29 08:15:33 -04:00
|
|
|
|
<c-n>
|
2012-01-23 21:13:51 -05:00
|
|
|
|
Next string in the prompt’s history.
|
2011-09-29 08:15:33 -04:00
|
|
|
|
|
|
|
|
|
<c-p>
|
2012-01-23 21:13:51 -05:00
|
|
|
|
Previous string in the prompt’s history.
|
2011-09-29 08:15:33 -04:00
|
|
|
|
|
2011-10-02 16:04:43 -04:00
|
|
|
|
<c-z>
|
2012-01-15 12:42:14 -05:00
|
|
|
|
- Mark/unmark a file to be opened with <c-o>.
|
2012-01-23 21:13:51 -05:00
|
|
|
|
- Mark/unmark a file to create a new file in its directory using <c-y>.
|
2011-10-02 16:04:43 -04:00
|
|
|
|
|
|
|
|
|
<c-o>
|
|
|
|
|
Open files marked by <c-z>.
|
|
|
|
|
|
2011-09-08 11:50:57 -04:00
|
|
|
|
<F5>
|
2011-11-28 07:52:28 -05:00
|
|
|
|
- Refresh the match window and purge the cache for the current directory.
|
|
|
|
|
- Remove deleted files from MRU list.
|
2011-09-08 11:50:57 -04:00
|
|
|
|
|
2011-11-28 07:52:28 -05:00
|
|
|
|
<F7>
|
|
|
|
|
Clear MRU list.
|
2011-11-12 10:00:50 -05:00
|
|
|
|
|
2012-01-28 12:29:09 -05:00
|
|
|
|
<insert>
|
|
|
|
|
Insert the word under the cursor (in the active buffer) into the prompt.
|
|
|
|
|
|
2011-08-21 22:14:00 -04:00
|
|
|
|
<esc>,
|
|
|
|
|
<c-c>,
|
|
|
|
|
<c-g>
|
2012-01-28 12:29:09 -05:00
|
|
|
|
Exit |CtrlP|.
|
|
|
|
|
<c-c> can also be used to stop the scan if it’s taking too long.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
2011-12-13 09:42:57 -05:00
|
|
|
|
Choose your own mappings with |g:ctrlp_prompt_mappings|.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
2012-01-28 12:29:09 -05:00
|
|
|
|
When inside the match window (press <s-tab> to switch):~
|
2011-09-11 12:53:32 -04:00
|
|
|
|
|
|
|
|
|
a-z
|
|
|
|
|
0-9
|
|
|
|
|
~^-=;`',.+!@#$%&_(){}[]
|
2011-09-14 18:16:15 -04:00
|
|
|
|
Cycle through the lines with the first letter (of paths or filenames) that
|
2011-09-14 10:38:37 -04:00
|
|
|
|
matches that key.
|
2011-09-11 12:53:32 -04:00
|
|
|
|
|
2011-08-21 22:14:00 -04:00
|
|
|
|
===============================================================================
|
|
|
|
|
5. Input Formats *ctrlp-input-formats*
|
|
|
|
|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
Formats for inputting in the prompt:~
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
2011-11-02 19:09:12 -04:00
|
|
|
|
a) Simple string.
|
|
|
|
|
e.g. 'abc' is understood internally as 'a[^a]\{-}b[^b]\{-}c'
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
2011-09-12 21:27:27 -04:00
|
|
|
|
b) Vim |regexp|. If the input string contains '*' or '|', it’ll be treated as
|
|
|
|
|
a Vim’s |regexp| |pattern| without any modification.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
e.g. 'abc\d*efg' will be read as 'abc\d*efg'.
|
|
|
|
|
|
2012-01-06 01:22:55 -05:00
|
|
|
|
See also |ctrlp-fullregexp| (keymap) and |g:ctrlp_regexp_search| (option).
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
2011-10-02 16:04:43 -04:00
|
|
|
|
c) End the string with a colon ':' followed by a Vim command to execute that
|
2012-01-06 01:22:55 -05:00
|
|
|
|
command after opening the file. If you need to use ':' literally, escape it
|
|
|
|
|
with a backslash: '\:'. When opening multiple files, the command will be
|
|
|
|
|
executed on each opening file.
|
2011-09-05 10:59:18 -04:00
|
|
|
|
e.g. 'abc:45' will open the selected file and jump to line 45.
|
2012-01-15 12:42:14 -05:00
|
|
|
|
'abc:/my\:string' will open the selected file and jump to the first
|
2011-10-02 16:04:43 -04:00
|
|
|
|
instance of 'my:function'.
|
|
|
|
|
'abc:+setf\ myfiletype|50' will open the selected file and set its
|
2012-01-06 01:22:55 -05:00
|
|
|
|
filetype to 'myfiletype', then jump to line 50.
|
2012-01-09 17:58:59 -05:00
|
|
|
|
'abc:diffthis' will open the selected file and run |:diffthis| on the
|
|
|
|
|
first 4 files.
|
2011-10-02 16:04:43 -04:00
|
|
|
|
|
2011-11-02 19:09:12 -04:00
|
|
|
|
See also Vim’s |++opt| and |+cmd|.
|
2011-09-05 10:59:18 -04:00
|
|
|
|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
d) Type exactly two dots '..' at the start of the prompt and press enter to go
|
2011-09-09 08:55:24 -04:00
|
|
|
|
backward in the directory tree by 1 level. If the parent directory is
|
|
|
|
|
large, this might be slow.
|
|
|
|
|
|
2011-12-17 21:58:44 -05:00
|
|
|
|
e) Similarly, submit '/' or '\' to find and go to the project’s root. If the
|
2011-11-12 10:00:50 -05:00
|
|
|
|
project is large, using a VCS listing command to look for files might help
|
|
|
|
|
speeding up the intial scan (see |g:ctrlp_user_command| for more details).
|
|
|
|
|
|
2012-01-15 12:42:14 -05:00
|
|
|
|
f) Type the name of a non-existent file and press <c-y> to create it. Mark a
|
|
|
|
|
file with <c-z> to create the new file in the same directory as the marked
|
|
|
|
|
file.
|
|
|
|
|
e.g. 'parentdir/newfile.txt' will create a directory named 'parentdir' as
|
|
|
|
|
well as 'newfile.txt'.
|
|
|
|
|
If 'some/old/dirs/oldfile.txt' is marked with <c-z>, then 'parentdir'
|
|
|
|
|
and 'newfile.txt' will be created in 'some/old/dirs'. The final path
|
|
|
|
|
will then be 'some/old/dirs/parentdir/newfile.txt'.
|
2011-11-12 10:00:50 -05:00
|
|
|
|
Use '\' in place of '/' on Windows (if |'ssl'| is not set).
|
2011-10-02 16:04:43 -04:00
|
|
|
|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
g) Submit ? to open this help file.
|
2011-10-08 10:42:18 -04:00
|
|
|
|
|
2011-11-28 07:52:28 -05:00
|
|
|
|
===============================================================================
|
2011-12-02 22:54:18 -05:00
|
|
|
|
6. Extensions *g:ctrlp-extensions*
|
2011-11-28 07:52:28 -05:00
|
|
|
|
|
|
|
|
|
Extensions are optional. To enable an extension, add its name to the variable
|
|
|
|
|
g:ctrlp_extensions: >
|
2012-01-15 12:42:14 -05:00
|
|
|
|
let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'dir', 'rtscript']
|
2011-11-28 07:52:28 -05:00
|
|
|
|
<
|
2011-12-02 22:54:18 -05:00
|
|
|
|
The order of the items will be the order they appear on the statusline and when
|
|
|
|
|
using <c-f>, <c-b>.
|
2011-11-28 07:52:28 -05:00
|
|
|
|
|
|
|
|
|
Available extensions:~
|
|
|
|
|
|
2011-12-02 22:54:18 -05:00
|
|
|
|
*:CtrlPTag*
|
2011-11-28 07:52:28 -05:00
|
|
|
|
* Tag mode:~
|
2011-12-01 04:36:21 -05:00
|
|
|
|
- Name: 'tag'
|
2011-11-28 07:52:28 -05:00
|
|
|
|
- Command: ':CtrlPTag'
|
|
|
|
|
- Search for a tag within a generated central tags file, and jump to the
|
|
|
|
|
definition. Use the Vim’s option |'tags'| to specify the names and the
|
|
|
|
|
locations of the tags file(s). Example: `set tags+=tags/help,doc/tags`
|
|
|
|
|
|
2011-12-21 06:58:08 -05:00
|
|
|
|
*:CtrlPBufTag*
|
2012-01-06 01:22:55 -05:00
|
|
|
|
*:CtrlPBufTagAll*
|
2011-12-21 06:58:08 -05:00
|
|
|
|
* Buffer Tag mode:~
|
|
|
|
|
- Name: 'buffertag'
|
2012-01-06 01:22:55 -05:00
|
|
|
|
- Commands: ':CtrlPBufTag [buffer-name]',
|
|
|
|
|
':CtrlPBufTagAll'.
|
|
|
|
|
- Search for a tag within the current buffer or all buffers and jump to the
|
|
|
|
|
definition. Requires |exuberant_ctags| or compatible programs.
|
2011-12-21 06:58:08 -05:00
|
|
|
|
|
2011-12-02 22:54:18 -05:00
|
|
|
|
*:CtrlPQuickfix*
|
2011-11-28 07:52:28 -05:00
|
|
|
|
* Quickfix mode:~
|
2011-12-01 04:36:21 -05:00
|
|
|
|
- Name: 'quickfix'
|
2011-11-28 07:52:28 -05:00
|
|
|
|
- Command: ':CtrlPQuickfix'
|
2011-11-30 04:42:19 -05:00
|
|
|
|
- Search for an entry in the current quickfix errors and jump to it.
|
|
|
|
|
|
2011-12-02 22:54:18 -05:00
|
|
|
|
*:CtrlPDir*
|
2011-11-30 04:42:19 -05:00
|
|
|
|
* Directory mode:~
|
2011-12-01 04:36:21 -05:00
|
|
|
|
- Name: 'dir'
|
2012-01-06 01:22:55 -05:00
|
|
|
|
- Command: ':CtrlPDir [starting-directory]'
|
2011-12-01 04:36:21 -05:00
|
|
|
|
- Search for a directory and change the working directory to it.
|
|
|
|
|
- Mappings:
|
|
|
|
|
+ <cr> change the local working directory for |CtrlP| and keep it open.
|
|
|
|
|
+ <c-t> change the global working directory (exit).
|
|
|
|
|
+ <c-v> change the local working directory for the current window (exit).
|
|
|
|
|
+ <c-x> change the global working directory to |CtrlP|’s current local
|
|
|
|
|
working directory (exit).
|
2011-11-28 07:52:28 -05:00
|
|
|
|
|
2012-01-15 12:42:14 -05:00
|
|
|
|
*:CtrlPRTS*
|
|
|
|
|
* Runtime script mode:~
|
2012-01-21 23:48:44 -05:00
|
|
|
|
- Name: 'rtscript'
|
2012-01-15 12:42:14 -05:00
|
|
|
|
- Command: ':CtrlPRTS'
|
2012-01-28 12:29:09 -05:00
|
|
|
|
- Search for files (vimscripts, docs, snippets...) in runtimepath.
|
2012-01-15 12:42:14 -05:00
|
|
|
|
|
2011-12-21 06:58:08 -05:00
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
|
Buffer Tag mode options:~
|
|
|
|
|
|
|
|
|
|
*'g:ctrlp_buftag_ctags_bin'*
|
|
|
|
|
If ctags isn’t in your $PATH, use this to set its location: >
|
|
|
|
|
let g:ctrlp_buftag_ctags_bin = ''
|
|
|
|
|
<
|
|
|
|
|
|
|
|
|
|
*'g:ctrlp_buftag_systemenc'*
|
|
|
|
|
Match this with your OS’s encoding (not Vim’s). The default value mirrors Vim’s
|
|
|
|
|
global |'encoding'| option: >
|
|
|
|
|
let g:ctrlp_buftag_systemenc = &encoding
|
|
|
|
|
<
|
|
|
|
|
|
|
|
|
|
*'g:ctrlp_buftag_types'*
|
|
|
|
|
Use this to set the arguments for ctags, jsctags... for a given filetype: >
|
|
|
|
|
let g:ctrlp_buftag_types = ''
|
|
|
|
|
<
|
|
|
|
|
Examples: >
|
|
|
|
|
let g:ctrlp_buftag_types = {
|
|
|
|
|
\ 'erlang' : '--language-force=erlang --erlang-types=drmf',
|
|
|
|
|
\ 'javascript' : {
|
|
|
|
|
\ 'bin': 'jsctags',
|
|
|
|
|
\ 'args': '-f -',
|
|
|
|
|
\ },
|
|
|
|
|
\ }
|
|
|
|
|
<
|
|
|
|
|
|
2012-02-04 06:41:27 -05:00
|
|
|
|
===============================================================================
|
|
|
|
|
CUSTOMIZATION *ctrlp-customization*
|
|
|
|
|
|
|
|
|
|
Highlighting:~
|
2012-02-04 08:28:03 -05:00
|
|
|
|
* For the |CtrlP| buffer:
|
2012-02-05 04:13:52 -05:00
|
|
|
|
CtrlPNoEntries : the message when no match is found (Error)
|
|
|
|
|
CtrlPMatch : the matched pattern (Identifier)
|
|
|
|
|
CtrlPLinePre : the line prefix '>' in the match window
|
|
|
|
|
CtrlPPrtBase : the prompt’s base (Comment)
|
|
|
|
|
CtrlPPrtText : the prompt’s text (|hl-Normal|)
|
|
|
|
|
CtrlPPrtCursor : the prompt’s cursor when moving over the text (Constant)
|
2012-02-04 06:41:27 -05:00
|
|
|
|
|
|
|
|
|
* In extensions:
|
2012-02-05 04:13:52 -05:00
|
|
|
|
CtrlPTabExtra : the part of each line that’s not matched against (Comment)
|
|
|
|
|
CtrlPqfLineCol : the line and column numbers in quickfix mode (|hl-Search|)
|
|
|
|
|
CtrlPUndoT : the elapsed time in undo mode (|hl-Directory|)
|
|
|
|
|
CtrlPUndoBr : the square brackets [] in undo mode (Comment)
|
|
|
|
|
CtrlPUndoNr : the undo number inside [] in undo mode (String)
|
2012-02-04 06:41:27 -05:00
|
|
|
|
|
|
|
|
|
Statuslines:~
|
|
|
|
|
* Highlight groups:
|
2012-02-05 04:13:52 -05:00
|
|
|
|
CtrlPMode1 : 'prt' or 'win', also for 'regex' (Character)
|
|
|
|
|
CtrlPMode2 : 'file' or 'path', also for the local working dir (|hl-LineNr|)
|
|
|
|
|
CtrlPStats : the scanning status (Function)
|
2012-02-04 06:41:27 -05:00
|
|
|
|
|
2012-02-05 04:13:52 -05:00
|
|
|
|
For rebuilding the statuslines, see |g:ctrlp_status_func|.
|
2012-02-04 06:41:27 -05:00
|
|
|
|
|
2011-11-04 11:35:26 -04:00
|
|
|
|
===============================================================================
|
|
|
|
|
CREDITS *ctrlp-credits*
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
2012-01-30 11:03:30 -05:00
|
|
|
|
Developed by Kien Nguyen <github.com/kien>.
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
2012-01-30 11:03:30 -05:00
|
|
|
|
Project’s homepage: http://kien.github.com/ctrlp.vim
|
2011-09-05 07:21:42 -04:00
|
|
|
|
Git repository: https://github.com/kien/ctrlp.vim
|
|
|
|
|
Mercurial repository: https://bitbucket.org/kien/ctrlp.vim
|
2011-08-21 22:14:00 -04:00
|
|
|
|
|
2012-01-30 11:03:30 -05:00
|
|
|
|
-------------------------------------------------------------------------------
|
2011-11-08 13:30:53 -05:00
|
|
|
|
Thanks to everyone that has submitted ideas, bug reports or helped debugging on
|
|
|
|
|
gibhub, bitbucket, and through email.
|
|
|
|
|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
Special thanks:~
|
2011-11-08 13:30:53 -05:00
|
|
|
|
|
|
|
|
|
* Woojong Koh <github.com/wjkoh>
|
|
|
|
|
Forked and suggested the support for VCS listing commands.
|
2011-10-23 06:38:03 -04:00
|
|
|
|
|
2011-11-29 22:45:46 -05:00
|
|
|
|
* Yasuhiro Matsumoto <github.com/mattn>
|
2012-01-23 21:13:51 -05:00
|
|
|
|
Added option to use Migemo for Japanese filenames.
|
2011-11-29 22:45:46 -05:00
|
|
|
|
|
2012-01-09 17:58:59 -05:00
|
|
|
|
* Kyo Nagashima <github.com/hail2u>
|
|
|
|
|
Made some enhancements to file opening mappings.
|
|
|
|
|
|
2012-01-22 10:51:08 -05:00
|
|
|
|
* Piet Delport <github.com/pjdelport>
|
2012-01-23 21:13:51 -05:00
|
|
|
|
Changed the default cache directory to meet XDG spec.
|
2012-01-22 10:51:08 -05:00
|
|
|
|
|
2012-01-22 07:20:27 -05:00
|
|
|
|
* Kent Sibilev <github.com/datanoise>
|
|
|
|
|
Debugged and made various patches.
|
|
|
|
|
|
2012-01-09 17:58:59 -05:00
|
|
|
|
* Simon Ruderich
|
|
|
|
|
* Ken Earley <github.com/kenearley>
|
|
|
|
|
* Zak Johnson <github.com/zakj>
|
|
|
|
|
* Diego Viola <github.com/diegoviola>
|
2012-01-26 05:11:07 -05:00
|
|
|
|
* Thibault Duplessis <github.com/ornicar>
|
2012-01-09 17:58:59 -05:00
|
|
|
|
Bugfixes/Corrections.
|
|
|
|
|
|
2011-09-07 10:41:43 -04:00
|
|
|
|
===============================================================================
|
2011-11-04 11:35:26 -04:00
|
|
|
|
CHANGELOG *ctrlp-changelog*
|
2011-11-02 19:09:12 -04:00
|
|
|
|
|
2012-01-23 21:13:51 -05:00
|
|
|
|
+ New option: |g:ctrlp_mruf_last_entered| change MRU to recently-entered.
|
2012-01-17 11:13:39 -05:00
|
|
|
|
|
2012-01-15 12:42:14 -05:00
|
|
|
|
Before 2012/01/15~
|
2012-01-12 21:13:39 -05:00
|
|
|
|
|
2012-01-16 08:14:09 -05:00
|
|
|
|
+ New mapping: Switch <tab> and <s-tab>. <tab> is now used for completion
|
|
|
|
|
of directory names under the current working directory.
|
2012-01-14 04:53:42 -05:00
|
|
|
|
+ New options: |g:ctrlp_arg_map| for <c-y>, <c-o> to accept an argument.
|
|
|
|
|
|g:ctrlp_status_func| custom statusline.
|
2012-01-15 12:42:14 -05:00
|
|
|
|
|g:ctrlp_mruf_relative| show only MRU files inside cwd.
|
2012-01-12 21:13:39 -05:00
|
|
|
|
+ Extend |g:ctrlp_open_multi| with new optional values: tr, hr, vr.
|
2012-01-06 01:22:55 -05:00
|
|
|
|
+ Extend |g:ctrlp_custom_ignore| to specifically filter dir, file and link.
|
|
|
|
|
|
|
|
|
|
Before 2012/01/05~
|
|
|
|
|
|
2011-12-21 06:58:08 -05:00
|
|
|
|
+ New feature: Buffer Tag extension.
|
2012-01-06 01:22:55 -05:00
|
|
|
|
+ New commands: |:CtrlPBufTag|, |:CtrlPBufTagAll|.
|
2011-12-17 21:58:44 -05:00
|
|
|
|
+ New options: |g:ctrlp_cmd|,
|
|
|
|
|
|g:ctrlp_custom_ignore|
|
|
|
|
|
|
2011-12-02 22:54:18 -05:00
|
|
|
|
Before 2011/11/30~
|
|
|
|
|
|
2011-11-30 04:42:19 -05:00
|
|
|
|
+ New features: Tag, Quickfix and Directory extensions.
|
2011-12-02 22:54:18 -05:00
|
|
|
|
+ New commands: |:CtrlPTag|, |:CtrlPQuickfix|, |:CtrlPDir|.
|
2011-11-29 23:11:14 -05:00
|
|
|
|
+ New options: |g:ctrlp_use_migemo|,
|
|
|
|
|
|g:ctrlp_lazy_update|,
|
2011-11-28 07:52:28 -05:00
|
|
|
|
|g:ctrlp_follow_symlinks|
|
2011-11-22 01:38:26 -05:00
|
|
|
|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
Before 2011/11/13~
|
|
|
|
|
|
|
|
|
|
+ New special input: '/' and '\' find root (section 5.e)
|
|
|
|
|
+ Remove ctrlp#SetWorkingPath().
|
|
|
|
|
+ Remove |g:ctrlp_mru_files|, make MRU permanent.
|
|
|
|
|
+ Extend |g:ctrlp_open_multi|, add new ways to open files.
|
|
|
|
|
+ New option: |g:ctrlp_dont_split|,
|
|
|
|
|
|g:ctrlp_mruf_case_sensitive|
|
2011-11-09 06:07:54 -05:00
|
|
|
|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
Before 2011/10/30~
|
2011-09-07 10:41:43 -04:00
|
|
|
|
|
2011-11-02 19:09:12 -04:00
|
|
|
|
+ New feature: Support for custom extensions.
|
2011-11-12 10:00:50 -05:00
|
|
|
|
<F5> also removes non-existent files from MRU list.
|
2011-10-22 10:57:29 -04:00
|
|
|
|
+ New option: |g:ctrlp_jump_to_buffer|
|
|
|
|
|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
Before 2011/10/12~
|
2011-10-19 08:00:08 -04:00
|
|
|
|
|
2011-10-02 16:04:43 -04:00
|
|
|
|
+ New features: Open multiple files.
|
2011-11-12 10:00:50 -05:00
|
|
|
|
Pass Vim’s |++opt| and |+cmd| to the opening file
|
|
|
|
|
(section 5.c)
|
2011-10-07 10:10:14 -04:00
|
|
|
|
Auto-complete each dir for |:CtrlP| [starting-directory]
|
2011-10-02 16:04:43 -04:00
|
|
|
|
+ New mappings: <c-z> mark/unmark a file to be opened with <c-o>.
|
|
|
|
|
<c-o> open all marked files.
|
|
|
|
|
+ New option: |g:ctrlp_open_multi|
|
2011-10-07 10:10:14 -04:00
|
|
|
|
+ Remove |g:ctrlp_persistent_input|, |g:ctrlp_live_update| and <c-^>.
|
2011-10-02 16:04:43 -04:00
|
|
|
|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
Before 2011/09/29~
|
2011-10-02 16:04:43 -04:00
|
|
|
|
|
|
|
|
|
+ New mappings: <c-n>, <c-p> next/prev string in the input history.
|
2011-10-23 06:38:03 -04:00
|
|
|
|
<c-y> create a new file and its parent dirs.
|
2011-09-29 08:15:33 -04:00
|
|
|
|
+ New options: |g:ctrlp_open_new_file|,
|
|
|
|
|
|g:ctrlp_max_history|
|
2011-09-28 09:42:52 -04:00
|
|
|
|
+ Added a new open-in-horizontal-split mapping: <c-x>
|
|
|
|
|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
Before 2011/09/19~
|
2011-09-28 09:42:52 -04:00
|
|
|
|
|
2011-09-18 07:33:37 -04:00
|
|
|
|
+ New command: |ResetCtrlP|
|
|
|
|
|
+ New options: |g:ctrlp_max_files|,
|
|
|
|
|
|g:ctrlp_max_depth|,
|
|
|
|
|
|g:ctrlp_live_update|
|
2011-10-02 16:04:43 -04:00
|
|
|
|
+ New mapping: <c-^>
|
2011-09-14 10:38:37 -04:00
|
|
|
|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
Before 2011/09/12~
|
2011-09-12 21:27:27 -04:00
|
|
|
|
|
2011-09-11 12:53:32 -04:00
|
|
|
|
+ Ability to cycle through matched lines in the match window.
|
2011-11-12 10:00:50 -05:00
|
|
|
|
+ Extend the behavior of |g:ctrlp_persistent_input|
|
|
|
|
|
+ Extend the behavior of |:CtrlP|
|
2011-09-18 07:33:37 -04:00
|
|
|
|
+ New options: |g:ctrlp_dotfiles|,
|
|
|
|
|
|g:ctrlp_clear_cache_on_exit|,
|
|
|
|
|
|g:ctrlp_highlight_match|,
|
|
|
|
|
|g:ctrlp_user_command|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
+ New special input: '..' (section 5.d)
|
2011-09-08 11:50:57 -04:00
|
|
|
|
+ New mapping: <F5>.
|
2011-09-09 08:55:24 -04:00
|
|
|
|
+ New commands: |:CtrlPCurWD|,
|
|
|
|
|
|:CtrlPCurFile|,
|
|
|
|
|
|:CtrlPRoot|
|
2011-09-08 11:50:57 -04:00
|
|
|
|
|
2011-10-02 16:04:43 -04:00
|
|
|
|
+ New feature: Search in most recently used (MRU) files
|
2011-09-07 10:41:43 -04:00
|
|
|
|
+ New mapping: <c-b>.
|
|
|
|
|
+ Extended the behavior of <c-f>.
|
|
|
|
|
+ New options: |g:ctrlp_mru_files|,
|
|
|
|
|
|g:ctrlp_mruf_max|,
|
|
|
|
|
|g:ctrlp_mruf_exclude|,
|
|
|
|
|
|g:ctrlp_mruf_include|
|
|
|
|
|
+ New command: |:CtrlPMRUFiles|
|
|
|
|
|
|
2011-11-12 10:00:50 -05:00
|
|
|
|
First public release: 2011/09/06~
|
2011-10-07 10:10:14 -04:00
|
|
|
|
|
2011-08-21 22:14:00 -04:00
|
|
|
|
===============================================================================
|
2011-11-28 07:52:28 -05:00
|
|
|
|
vim:ft=help:et:ts=2:sw=2:sts=2:norl
|