Add an overview section

This commit is contained in:
Kien N 2012-04-09 01:08:00 +07:00
parent 1dfd1e1b84
commit 38831712e8

View File

@ -33,7 +33,50 @@ To enable optional extensions (tag, dir, rtscript...), see |ctrlp-extensions|.
===============================================================================
OPTIONS *ctrlp-options*
Below are the available options and their default values:~
Overview:~
|loaded_ctrlp| Disable the plugin.
|ctrlp_map| Default mapping.
|ctrlp_cmd| Default command used for the default mapping.
|ctrlp_by_filename| Default to filename mode or not.
|ctrlp_regexp| Default to regexp mode or not.
|ctrlp_match_window_bottom| Where to show the match window.
|ctrlp_match_window_reversed| Sort order in the match window.
|ctrlp_max_height| Max height of the match window.
|ctrlp_switch_buffer| Jump to an open buffer if already opened.
|ctrlp_reuse_window| Reuse special windows (help, quickfix, etc).
|ctrlp_working_path_mode| How to set CtrlPs local working directory.
|ctrlp_root_markers| Additional, high priority root markers.
|ctrlp_use_caching| Use per-session caching or not.
|ctrlp_clear_cache_on_exit| Keep cache after exiting Vim or not.
|ctrlp_cache_dir| Location of the cache directory.
|ctrlp_dotfiles| Ignore dotfiles and dotdirs or not.
|ctrlp_custom_ignore| Hide stuff when using |globpath()|.
|ctrlp_max_files| Number of files to scan initially.
|ctrlp_max_depth| Directory depth to recurse into when scanning.
|ctrlp_user_command| Use an external scanner.
|ctrlp_max_history| Number of entries saved in the prompt history.
|ctrlp_open_new_file| How to open a file created by <c-y>.
|ctrlp_open_multiple_files| How to open files selected by <c-z>.
|ctrlp_arg_map| Intercept <c-y> and <c-o> or not.
|ctrlp_follow_symlinks| Follow symbolic links or not.
|ctrlp_lazy_update| Only update when typing has stopped.
|ctrlp_default_input| Seed the prompt with an initial string.
|ctrlp_use_migemo| Use Migemo patterns for Japanese filenames.
|ctrlp_prompt_mappings| Change the mappings in the prompt.
MRU mode:
|ctrlp_mruf_max| Max MRU entries to remember.
|ctrlp_mruf_exclude| Files that shouldnt be remembered.
|ctrlp_mruf_include| Files to be remembered.
|ctrlp_mruf_relative| Show only MRU files in the working directory.
|ctrlp_mruf_case_sensitive| MRU files are case sensitive or not.
Advanced options:
|ctrlp_status_func| Change CtrlPs two statuslines.
|ctrlp_buffer_func| Call custom functions in the CtrlP buffer.
|ctrlp_match_func| Replace the built-in matching algorithm.
-------------------------------------------------------------------------------
Detailed descriptions and default values:~
*'g:ctrlp_map'*
Use this option to change the mapping to invoke CtrlP in |Normal| mode: >
@ -135,88 +178,6 @@ Set the directory to store the cache files: >
let g:ctrlp_cache_dir = $HOME.'/.cache/ctrlp'
<
*'g:ctrlp_prompt_mappings'*
Use this to customize the mappings inside CtrlPs prompt to your liking. You
only need to keep the lines that youve changed the values (inside []): >
let g:ctrlp_prompt_mappings = {
\ 'PrtBS()': ['<bs>', '<c-]>'],
\ 'PrtDelete()': ['<del>'],
\ 'PrtDeleteWord()': ['<c-w>'],
\ 'PrtClear()': ['<c-u>'],
\ 'PrtSelectMove("j")': ['<c-j>', '<down>'],
\ 'PrtSelectMove("k")': ['<c-k>', '<up>'],
\ 'PrtSelectMove("t")': ['<Home>', '<kHome>'],
\ 'PrtSelectMove("b")': ['<End>', '<kEnd>'],
\ 'PrtSelectMove("u")': ['<PageUp>', '<kPageUp>'],
\ 'PrtSelectMove("d")': ['<PageDown>', '<kPageDown>'],
\ 'PrtHistory(-1)': ['<c-n>'],
\ 'PrtHistory(1)': ['<c-p>'],
\ 'AcceptSelection("e")': ['<cr>', '<2-LeftMouse>'],
\ 'AcceptSelection("h")': ['<c-x>', '<c-cr>', '<c-s>'],
\ 'AcceptSelection("t")': ['<c-t>', '<MiddleMouse>'],
\ 'AcceptSelection("v")': ['<c-v>', '<RightMouse>'],
\ 'ToggleFocus()': ['<s-tab>'],
\ 'ToggleRegex()': ['<c-r>'],
\ 'ToggleByFname()': ['<c-d>'],
\ 'ToggleType(1)': ['<c-f>', '<c-up>'],
\ 'ToggleType(-1)': ['<c-b>', '<c-down>'],
\ 'PrtExpandDir()': ['<tab>'],
\ 'PrtInsert("w")': ['<F2>', '<insert>'],
\ 'PrtInsert("s")': ['<F3>'],
\ 'PrtInsert("v")': ['<F4>'],
\ 'PrtInsert("+")': ['<F6>'],
\ 'PrtCurStart()': ['<c-a>'],
\ 'PrtCurEnd()': ['<c-e>'],
\ 'PrtCurLeft()': ['<c-h>', '<left>', '<c-^>'],
\ 'PrtCurRight()': ['<c-l>', '<right>'],
\ 'PrtClearCache()': ['<F5>'],
\ 'PrtDeleteMRU()': ['<F7>'],
\ 'CreateNewFile()': ['<c-y>'],
\ 'MarkToOpen()': ['<c-z>'],
\ 'OpenMulti()': ['<c-o>'],
\ 'PrtExit()': ['<esc>', '<c-c>', '<c-g>'],
\ }
<
Note: In some terminals, its not possible to remap <c-h> without also changing
<bs> (|keycodes|). So if pressing <bs> moves the cursor to the left instead of
deleting a char for you, add this to your |.vimrc| to disable the plugins
default <c-h> mapping: >
let g:ctrlp_prompt_mappings = { 'PrtCurLeft()': ['<left>', '<c-^>'] }
<
*'g:ctrlp_mruf_max'*
Specify the number of recently opened files you want CtrlP to remember: >
let g:ctrlp_mruf_max = 250
<
*'g:ctrlp_mruf_exclude'*
Files you dont want CtrlP to remember. Use regexp to specify the patterns: >
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: >
let g:ctrlp_mruf_include = '\.py$\|\.rb$'
<
*'g:ctrlp_mruf_relative'*
Set this to 1 to show only MRU files in the current working directory: >
let g:ctrlp_mruf_relative = 0
<
*'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
<
*'g:ctrlp_dotfiles'*
Set this to 0 if you dont want CtrlP to scan for dotfiles and dotdirs: >
let g:ctrlp_dotfiles = 1
@ -378,8 +339,93 @@ works in regexp mode. To split the pattern, separate words with space: >
let g:ctrlp_use_migemo = 0
<
-------------------------------------------------------------------------------
ADVANCED OPTIONS *ctrlp-advanced-options*
*'g:ctrlp_prompt_mappings'*
Use this to customize the mappings inside CtrlPs prompt to your liking. You
only need to keep the lines that youve changed the values (inside []): >
let g:ctrlp_prompt_mappings = {
\ 'PrtBS()': ['<bs>', '<c-]>'],
\ 'PrtDelete()': ['<del>'],
\ 'PrtDeleteWord()': ['<c-w>'],
\ 'PrtClear()': ['<c-u>'],
\ 'PrtSelectMove("j")': ['<c-j>', '<down>'],
\ 'PrtSelectMove("k")': ['<c-k>', '<up>'],
\ 'PrtSelectMove("t")': ['<Home>', '<kHome>'],
\ 'PrtSelectMove("b")': ['<End>', '<kEnd>'],
\ 'PrtSelectMove("u")': ['<PageUp>', '<kPageUp>'],
\ 'PrtSelectMove("d")': ['<PageDown>', '<kPageDown>'],
\ 'PrtHistory(-1)': ['<c-n>'],
\ 'PrtHistory(1)': ['<c-p>'],
\ 'AcceptSelection("e")': ['<cr>', '<2-LeftMouse>'],
\ 'AcceptSelection("h")': ['<c-x>', '<c-cr>', '<c-s>'],
\ 'AcceptSelection("t")': ['<c-t>', '<MiddleMouse>'],
\ 'AcceptSelection("v")': ['<c-v>', '<RightMouse>'],
\ 'ToggleFocus()': ['<s-tab>'],
\ 'ToggleRegex()': ['<c-r>'],
\ 'ToggleByFname()': ['<c-d>'],
\ 'ToggleType(1)': ['<c-f>', '<c-up>'],
\ 'ToggleType(-1)': ['<c-b>', '<c-down>'],
\ 'PrtExpandDir()': ['<tab>'],
\ 'PrtInsert("w")': ['<F2>', '<insert>'],
\ 'PrtInsert("s")': ['<F3>'],
\ 'PrtInsert("v")': ['<F4>'],
\ 'PrtInsert("+")': ['<F6>'],
\ 'PrtCurStart()': ['<c-a>'],
\ 'PrtCurEnd()': ['<c-e>'],
\ 'PrtCurLeft()': ['<c-h>', '<left>', '<c-^>'],
\ 'PrtCurRight()': ['<c-l>', '<right>'],
\ 'PrtClearCache()': ['<F5>'],
\ 'PrtDeleteMRU()': ['<F7>'],
\ 'CreateNewFile()': ['<c-y>'],
\ 'MarkToOpen()': ['<c-z>'],
\ 'OpenMulti()': ['<c-o>'],
\ 'PrtExit()': ['<esc>', '<c-c>', '<c-g>'],
\ }
<
Note: In some terminals, its not possible to remap <c-h> without also changing
<bs> (|keycodes|). So if pressing <bs> moves the cursor to the left instead of
deleting a char for you, add this to your |.vimrc| to disable the plugins
default <c-h> mapping: >
let g:ctrlp_prompt_mappings = { 'PrtCurLeft()': ['<left>', '<c-^>'] }
<
----------------------------------------
MRU mode options:~
*'g:ctrlp_mruf_max'*
Specify the number of recently opened files you want CtrlP to remember: >
let g:ctrlp_mruf_max = 250
<
*'g:ctrlp_mruf_exclude'*
Files you dont want CtrlP to remember. Use regexp to specify the patterns: >
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: >
let g:ctrlp_mruf_include = '\.py$\|\.rb$'
<
*'g:ctrlp_mruf_relative'*
Set this to 1 to show only MRU files in the current working directory: >
let g:ctrlp_mruf_relative = 0
<
*'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
<
----------------------------------------
Advanced options:~
*'g:ctrlp_status_func'*
Use this to customize the statuslines for the CtrlP window: >
@ -521,6 +567,9 @@ The following commands ignore the current value of |g:ctrlp_working_path_mode|:
:CtrlPRoot *:CtrlPRoot*
This acts like |:CtrlP| with |path_mode| = 2
-------------------------------------------------------------------------------
For commands provided by bundled extensions, see |ctrlp-extensions|.
===============================================================================
MAPPINGS *ctrlp-mappings*
@ -709,7 +758,7 @@ f) Type the name of a non-existent file and press <c-y> to create it. Mark a
g) Submit ? to open this help file.
===============================================================================
EXTENSIONS *g:ctrlp-extensions*
EXTENSIONS *ctrlp-extensions*
Extensions are optional. To enable an extension, add its name to the variable
g:ctrlp_extensions: >