| 707 | 1 *ctrlp.txt*       Fuzzy file, buffer, mru, tag, ... finder. v1.80 | 
|  | 2 *CtrlP* *ControlP* *'ctrlp'* *'ctrl-p'* | 
|  | 3 =============================================================================== | 
|  | 4 #                                                                             # | 
|  | 5 #          :::::::: ::::::::::: :::::::::  :::             :::::::::          # | 
|  | 6 #         :+:    :+:    :+:     :+:    :+: :+:             :+:    :+:         # | 
|  | 7 #         +:+           +:+     +:+    +:+ +:+             +:+    +:+         # | 
|  | 8 #         +#+           +#+     +#++:++#:  +#+             +#++:++#+          # | 
|  | 9 #         +#+           +#+     +#+    +#+ +#+             +#+                # | 
|  | 10 #         #+#    #+#    #+#     #+#    #+# #+#             #+#                # | 
|  | 11 #          ########     ###     ###    ### ##########      ###                # | 
|  | 12 #                                                                             # | 
|  | 13 =============================================================================== | 
|  | 14 CONTENTS                                                       *ctrlp-contents* | 
|  | 15 | 
|  | 16     1. Intro........................................|ctrlp-intro| | 
|  | 17     2. Options......................................|ctrlp-options| | 
|  | 18     3. Commands.....................................|ctrlp-commands| | 
|  | 19     4. Mappings.....................................|ctrlp-mappings| | 
|  | 20     5. Input Formats................................|ctrlp-input-formats| | 
|  | 21     6. Extensions...................................|ctrlp-extensions| | 
|  | 22 | 
|  | 23 =============================================================================== | 
|  | 24 INTRO                                                             *ctrlp-intro* | 
|  | 25 | 
|  | 26 Full path fuzzy file, buffer, mru, tag, ... finder with an intuitive interface. | 
|  | 27 Written in pure Vimscript for MacVim, gVim and Vim version 7.0+. Has full | 
|  | 28 support for Vim's |regexp| as search pattern, built-in MRU files monitoring, | 
|  | 29 project's root finder, and more. | 
|  | 30 | 
|  | 31 To enable optional extensions (tag, dir, rtscript...), see |ctrlp-extensions|. | 
|  | 32 | 
|  | 33 =============================================================================== | 
|  | 34 OPTIONS                                                         *ctrlp-options* | 
|  | 35 | 
|  | 36 Overview:~ | 
|  | 37 | 
|  | 38   |loaded_ctrlp|................Disable the plugin. | 
|  | 39   |ctrlp_map|...................Default mapping. | 
|  | 40   |ctrlp_cmd|...................Default command used for the default mapping. | 
|  | 41   |ctrlp_by_filename|...........Default to filename mode or not. | 
|  | 42   |ctrlp_regexp|................Default to regexp mode or not. | 
|  | 43   |ctrlp_match_window|..........Order, height and position of the match window. | 
|  | 44   |ctrlp_switch_buffer|.........Jump to an open buffer if already opened. | 
|  | 45   |ctrlp_reuse_window|..........Reuse special windows (help, quickfix, etc). | 
|  | 46   |ctrlp_tabpage_position|......Where to put the new tab page. | 
|  | 47   |ctrlp_working_path_mode|.....How to set CtrlP's local working directory. | 
|  | 48   |ctrlp_root_markers|..........Additional, high priority root markers. | 
|  | 49   |ctrlp_use_caching|...........Use per-session caching or not. | 
|  | 50   |ctrlp_clear_cache_on_exit|...Keep cache after exiting Vim or not. | 
|  | 51   |ctrlp_cache_dir|.............Location of the cache directory. | 
|  | 52   |ctrlp_show_hidden|...........Ignore dotfiles and dotdirs or not. | 
|  | 53   |ctrlp_custom_ignore|.........Hide stuff when using |globpath()|. | 
|  | 54   |ctrlp_max_files|.............Number of files to scan initially. | 
|  | 55   |ctrlp_max_depth|.............Directory depth to recurse into when scanning. | 
|  | 56   |ctrlp_user_command|..........Use an external scanner. | 
|  | 57   |ctrlp_max_history|...........Number of entries saved in the prompt history. | 
|  | 58   |ctrlp_open_new_file|.........How to open a file created by <c-y>. | 
|  | 59   |ctrlp_open_multiple_files|...How to open files selected by <c-z>. | 
|  | 60   |ctrlp_arg_map|...............Intercept <c-y> and <c-o> or not. | 
|  | 61   |ctrlp_follow_symlinks|.......Follow symbolic links or not. | 
|  | 62   |ctrlp_lazy_update|...........Only update when typing has stopped. | 
|  | 63   |ctrlp_default_input|.........Seed the prompt with an initial string. | 
|  | 64   |ctrlp_abbrev|................Input abbreviations. | 
|  | 65   |ctrlp_key_loop|..............Use input looping for multi-byte input. | 
|  | 66   |ctrlp_prompt_mappings|.......Change the mappings inside the prompt. | 
|  | 67   |ctrlp_line_prefix|...........Prefix for each line in ctrlp window. | 
|  | 68   |ctrlp_open_single_match|.....Automatically accept when only one candidate. | 
|  | 69   |ctrlp_brief_prompt|..........Exit CtrlP on empty prompt by <bs>. | 
|  | 70   |ctrlp_match_current_file|....Include current file in match entries. | 
|  | 71   |ctrlp_types|.................Names of builtin types. | 
|  | 72 | 
|  | 73   MRU mode: | 
|  | 74   |ctrlp_mruf_max|..............Max MRU entries to remember. | 
|  | 75   |ctrlp_mruf_exclude|..........Files that shouldn't be remembered. | 
|  | 76   |ctrlp_mruf_include|..........Files to be remembered. | 
|  | 77   |ctrlp_mruf_relative|.........Show only MRU files in the working directory. | 
|  | 78   |ctrlp_tilde_homedir|....Save MRU file paths in home dir as ~/. | 
|  | 79   |ctrlp_mruf_default_order|....Disable sorting. | 
|  | 80   |ctrlp_mruf_case_sensitive|...MRU files are case sensitive or not. | 
|  | 81   |ctrlp_mruf_save_on_update|...Save to disk whenever a new entry is added. | 
|  | 82 | 
|  | 83   Buffer mode: | 
|  | 84   |ctrlp_bufname_mod|...........File name section modificator. | 
|  | 85   |ctrlp_bufpath_mod|...........File path section modificator. | 
|  | 86 | 
|  | 87   BufferTag mode: (to enable, see |ctrlp-extensions|) | 
|  | 88   |g:ctrlp_buftag_ctags_bin|....The location of the ctags-compatible binary. | 
|  | 89   |g:ctrlp_buftag_systemenc|....The encoding used for the ctags command. | 
|  | 90   |g:ctrlp_buftag_types|........Add new filetypes and set the cmd arguments. | 
|  | 91 | 
|  | 92   Advanced options: | 
|  | 93   |ctrlp_open_func|.............Use custom file opening functions. | 
|  | 94   |ctrlp_status_func|...........Change CtrlP's two statuslines. | 
|  | 95   |ctrlp_buffer_func|...........Call custom functions in the CtrlP buffer. | 
|  | 96   |ctrlp_match_func|............Replace the built-in matching algorithm. | 
|  | 97 | 
|  | 98 ------------------------------------------------------------------------------- | 
|  | 99 Detailed descriptions and default values:~ | 
|  | 100 | 
|  | 101                                                                 *'g:ctrlp_map'* | 
|  | 102 Use this option to change the mapping to invoke CtrlP in |Normal| mode: > | 
|  | 103   let g:ctrlp_map = '<c-p>' | 
|  | 104 < | 
|  | 105 | 
|  | 106                                                                 *'g:ctrlp_cmd'* | 
|  | 107 Set the default opening command to use when pressing the above mapping: > | 
|  | 108   let g:ctrlp_cmd = 'CtrlP' | 
|  | 109 < | 
|  | 110 | 
|  | 111                                                              *'g:loaded_ctrlp'* | 
|  | 112 Use this to disable the plugin completely: > | 
|  | 113   let g:loaded_ctrlp = 1 | 
|  | 114 < | 
|  | 115 | 
|  | 116                                                         *'g:ctrlp_by_filename'* | 
|  | 117 Set this to 1 to set searching by filename (as opposed to full path) as the | 
|  | 118 default: > | 
|  | 119   let g:ctrlp_by_filename = 0 | 
|  | 120 < | 
|  | 121 Can be toggled on/off by pressing <c-d> inside the prompt. | 
|  | 122 | 
|  | 123                                                              *'g:ctrlp_regexp'* | 
|  | 124 Set this to 1 to set regexp search as the default: > | 
|  | 125   let g:ctrlp_regexp = 0 | 
|  | 126 < | 
|  | 127 Can be toggled on/off by pressing <c-r> inside the prompt. | 
|  | 128 | 
|  | 129                                                        *'g:ctrlp_match_window'* | 
|  | 130 Change the position, the listing order of results, the minimum and the maximum | 
|  | 131 heights of the match window: > | 
|  | 132   let g:ctrlp_match_window = '' | 
|  | 133 < | 
|  | 134 Example: > | 
|  | 135   let g:ctrlp_match_window = 'bottom,order:btt,min:1,max:10,results:10' | 
|  | 136 < | 
|  | 137 The position: (default: bottom) | 
|  | 138   top - show the match window at the top of the screen. | 
|  | 139   bottom - show the match window at the bottom of the screen. | 
|  | 140 | 
|  | 141 The listing order of results: (default: btt) | 
|  | 142   order:ttb - from top to bottom. | 
|  | 143   order:btt - from bottom to top. | 
|  | 144 | 
|  | 145 The minimum and maximum heights: | 
|  | 146   min:{n} - show minimum {n} lines (default: 1). | 
|  | 147   max:{n} - show maximum {n} lines (default: 10). | 
|  | 148 | 
|  | 149 The maximum number of results: | 
|  | 150   results:{n} - list maximum {n} results (default: sync with max height). | 
|  | 151                 0 mean no-limit. | 
|  | 152 | 
|  | 153 Note: When a setting isn't set, its default value will be used. | 
|  | 154 | 
|  | 155                                                       *'g:ctrlp_switch_buffer'* | 
|  | 156 When opening a file, if it's already open in a window somewhere, CtrlP will try | 
|  | 157 to jump to it instead of opening a new instance: > | 
|  | 158   let g:ctrlp_switch_buffer = 'Et' | 
|  | 159 < | 
|  | 160   e - jump when <cr> is pressed, but only to windows in the current tab. | 
|  | 161   t - jump when <c-t> is pressed, but only to windows in another tab. | 
|  | 162   v - like "e", but jump when <c-v> is pressed. | 
|  | 163   h - like "e", but jump when <c-x> is pressed. | 
|  | 164   E, T, V, H - like "e", "t", "v", and "h", but jump to windows anywhere. | 
|  | 165   0 or <empty> - disable this feature. | 
|  | 166 | 
|  | 167                                                        *'g:ctrlp_reuse_window'* | 
|  | 168 When opening a file with <cr>, CtrlP avoids opening it in windows created by | 
|  | 169 plugins, help and quickfix. Use this to setup some exceptions: > | 
|  | 170   let g:ctrlp_reuse_window = 'netrw' | 
|  | 171 < | 
|  | 172 Acceptable values are partial name, filetype or buftype of the special buffers. | 
|  | 173 Use regexp to specify the pattern. | 
|  | 174 Example: > | 
|  | 175   let g:ctrlp_reuse_window = 'netrw\|help\|quickfix' | 
|  | 176 < | 
|  | 177 | 
|  | 178                                                    *'g:ctrlp_tabpage_position'* | 
|  | 179 Where to put the new tab page when opening one: > | 
|  | 180   let g:ctrlp_tabpage_position = 'ac' | 
|  | 181 < | 
|  | 182   a - after. | 
|  | 183   b - before. | 
|  | 184   c - the current tab page. | 
|  | 185   l - the last tab page. | 
|  | 186   f - the first tab page. | 
|  | 187 | 
|  | 188                                                   *'g:ctrlp_working_path_mode'* | 
|  | 189 When starting up, CtrlP sets its local working directory according to this | 
|  | 190 variable: > | 
|  | 191   let g:ctrlp_working_path_mode = 'ra' | 
|  | 192 < | 
|  | 193   c - the directory of the current file. | 
|  | 194   a - the directory of the current file, unless it is a subdirectory of the cwd | 
|  | 195   r - the nearest ancestor of the current file that contains one of these | 
|  | 196       directories or files: | 
|  | 197       .git .hg .svn .bzr _darcs | 
|  | 198   w - modifier to "r": start search from the cwd instead of the current file's | 
|  | 199       directory | 
|  | 200   0 or <empty> - disable this feature. | 
|  | 201 | 
|  | 202 Note #1: if "a" or "c" is included with "r", use the behavior of "a" or "c" (as | 
|  | 203 a fallback) when a root can't be found. | 
|  | 204 | 
|  | 205 Note #2: you can use a |b:var| to set this option on a per buffer basis. | 
|  | 206 | 
|  | 207                                                        *'g:ctrlp_root_markers'* | 
|  | 208 Use this to set your own root markers in addition to the default ones (.git, | 
|  | 209 .hg, .svn, .bzr, and _darcs). Your markers will take precedence: > | 
|  | 210   let g:ctrlp_root_markers = [''] | 
|  | 211 < | 
|  | 212 Note: you can use a |b:var| to set this option on a per buffer basis. | 
|  | 213 | 
|  | 214                                                         *'g:ctrlp_use_caching'* | 
|  | 215 Enable/Disable per-session caching: > | 
|  | 216   let g:ctrlp_use_caching = 1 | 
|  | 217 < | 
|  | 218   0 - Disable caching. | 
|  | 219   1 - Enable caching. | 
|  | 220   n - When bigger than 1, disable caching and use the number as the limit to | 
|  | 221       enable caching again. | 
|  | 222 | 
|  | 223 Note: you can quickly purge the cache by pressing <F5> while inside CtrlP. | 
|  | 224 | 
|  | 225                                                 *'g:ctrlp_clear_cache_on_exit'* | 
|  | 226 Set this to 0 to enable cross-session caching by not deleting the cache files | 
|  | 227 upon exiting Vim: > | 
|  | 228   let g:ctrlp_clear_cache_on_exit = 1 | 
|  | 229 < | 
|  | 230 | 
|  | 231                                                           *'g:ctrlp_cache_dir'* | 
|  | 232 Set the directory to store the cache files: > | 
|  | 233   let g:ctrlp_cache_dir = $HOME.'/.cache/ctrlp' | 
|  | 234 < | 
|  | 235 | 
|  | 236                                                         *'g:ctrlp_show_hidden'* | 
|  | 237 Set this to 1 if you want CtrlP to scan for dotfiles and dotdirs: > | 
|  | 238   let g:ctrlp_show_hidden = 0 | 
|  | 239 < | 
|  | 240 Note: does not apply when a command defined with |g:ctrlp_user_command| is | 
|  | 241 being used. | 
|  | 242 | 
|  | 243                                                       *'g:ctrlp_custom_ignore'* | 
|  | 244 In addition to |g:ctrlp_show_hidden|, use this for files | 
|  | 245 and directories you want only CtrlP to not show. Use regexp to specify the | 
|  | 246 patterns: > | 
|  | 247   let g:ctrlp_custom_ignore = '' | 
|  | 248 < | 
|  | 249 Examples: > | 
|  | 250   let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$' | 
|  | 251   let g:ctrlp_custom_ignore = { | 
|  | 252     \ 'dir':  '\v[\/]\.(git|hg|svn)$', | 
|  | 253     \ 'file': '\v\.(exe|so|dll)$', | 
|  | 254     \ 'link': 'SOME_BAD_SYMBOLIC_LINKS', | 
|  | 255     \ } | 
|  | 256   let g:ctrlp_custom_ignore = { | 
|  | 257     \ 'file': '\v(\.cpp|\.h|\.hh|\.cxx)@<!$' | 
|  | 258     \ } | 
|  | 259   let g:ctrlp_custom_ignore = { | 
|  | 260     \ 'func': 'some#custom#match_function' | 
|  | 261     \ } | 
|  | 262 < | 
|  | 263 Note #1: |g:ctrlp_custom_ignore| does not apply when a | 
|  | 264 command defined with |g:ctrlp_user_command| is being used. | 
|  | 265 | 
|  | 266 Note #2: when changing the option's variable type, remember to |:unlet| it | 
|  | 267 first or restart Vim to avoid the "E706: Variable type mismatch" error. | 
|  | 268 | 
|  | 269 Note #3: when using the "func" ignore type, you must provide the full name of | 
|  | 270 a function that can be called from CtrlP. An |autoload| function name is | 
|  | 271 recommended here. The function must take 2 parameters, the item to match and | 
|  | 272 its type. The type will be "dir", "file", or "link". The function must return | 
|  | 273 1 if the item should be ignored, 0 otherwise. | 
|  | 274 | 
|  | 275 Note #4: when |g:ctrlp_use_readdir| is set to 0, you can also use Vim's |'wildignore'| | 
|  | 276 to exclude files and directories. | 
|  | 277 | 
|  | 278                                                           *'g:ctrlp_max_files'* | 
|  | 279 The maximum number of files to scan, set to 0 for no limit: > | 
|  | 280   let g:ctrlp_max_files = 10000 | 
|  | 281 < | 
|  | 282 Note: does not apply when a command defined with |g:ctrlp_user_command| is | 
|  | 283 being used. | 
|  | 284 | 
|  | 285                                                           *'g:ctrlp_max_depth'* | 
|  | 286 The maximum depth of a directory tree to recurse into: > | 
|  | 287   let g:ctrlp_max_depth = 40 | 
|  | 288 < | 
|  | 289 Note: does not apply when a command defined with |g:ctrlp_user_command| is | 
|  | 290 being used. | 
|  | 291 | 
|  | 292                                                        *'g:ctrlp_user_command'* | 
|  | 293 Specify an external tool to use for listing files instead of using Vim's | 
|  | 294 |globpath()|. Use %s in place of the target directory: > | 
|  | 295   let g:ctrlp_user_command = '' | 
|  | 296 < | 
|  | 297 Examples: > | 
|  | 298   let g:ctrlp_user_command = 'find %s -type f'       " MacOSX/Linux | 
|  | 299   let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d' " Windows | 
|  | 300 < | 
|  | 301 You can also use 'grep', 'findstr' or something else to filter the results. | 
|  | 302 Examples: > | 
|  | 303   let g:ctrlp_user_command = | 
|  | 304     \ 'find %s -type f | grep -v -P "\.jpg$|/tmp/"'          " MacOSX/Linux | 
|  | 305   let g:ctrlp_user_command = | 
|  | 306     \ 'dir %s /-n /b /s /a-d | findstr /v /l ".jpg \\tmp\\"' " Windows | 
|  | 307 < | 
|  | 308 Use a version control listing command when inside a repository, this is faster | 
|  | 309 when scanning large projects: > | 
|  | 310   let g:ctrlp_user_command = [root_marker, listing_command, fallback_command] | 
|  | 311   let g:ctrlp_user_command = { | 
|  | 312     \ 'types': { | 
|  | 313       \ 1: [root_marker_1, listing_command_1], | 
|  | 314       \ n: [root_marker_n, listing_command_n], | 
|  | 315       \ }, | 
|  | 316     \ 'fallback': fallback_command, | 
|  | 317     \ 'ignore': 0 or 1 | 
|  | 318     \ } | 
|  | 319 < | 
|  | 320 Some examples: > | 
|  | 321   " Single VCS, listing command does not list untracked files: | 
|  | 322   let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files'] | 
|  | 323   let g:ctrlp_user_command = ['.hg', 'hg --cwd %s locate -I .'] | 
|  | 324 | 
|  | 325   " Multiple VCS's: | 
|  | 326   let g:ctrlp_user_command = { | 
|  | 327     \ 'types': { | 
|  | 328       \ 1: ['.git', 'cd %s && git ls-files'], | 
|  | 329       \ 2: ['.hg', 'hg --cwd %s locate -I .'], | 
|  | 330       \ }, | 
|  | 331     \ 'fallback': 'find %s -type f' | 
|  | 332     \ } | 
|  | 333 | 
|  | 334   " Single VCS, listing command lists untracked files (slower): | 
|  | 335   let g:ctrlp_user_command = | 
|  | 336     \ ['.git', 'cd %s && git ls-files -co --exclude-standard'] | 
|  | 337 | 
|  | 338   let g:ctrlp_user_command = | 
|  | 339     \ ['.hg', 'hg --cwd %s status -numac -I . $(hg root)'] " MacOSX/Linux | 
|  | 340 | 
|  | 341   let g:ctrlp_user_command = ['.hg', 'for /f "tokens=1" %%a in (''hg root'') ' | 
|  | 342     \ . 'do hg --cwd %s status -numac -I . %%a']           " Windows | 
|  | 343 < | 
|  | 344 Note #1: in the |Dictionary| format, 'fallback' and 'ignore' are optional. In | 
|  | 345 the |List| format, fallback_command is optional. | 
|  | 346 | 
|  | 347 Note #2: if the fallback_command is empty or the 'fallback' key is not defined, | 
|  | 348 |globpath()| will then be used when scanning outside of a repository. | 
|  | 349 | 
|  | 350 Note #3: unless the |Dictionary| format is used and 'ignore' is defined and set | 
|  | 351 to 1, the |wildignore| and |g:ctrlp_custom_ignore| options do not apply when | 
|  | 352 these custom commands are being used. When not present, 'ignore' is set to 0 by | 
|  | 353 default to retain the performance advantage of using external commands. | 
|  | 354 | 
|  | 355 Note #4: when changing the option's variable type, remember to |:unlet| it | 
|  | 356 first or restart Vim to avoid the "E706: Variable type mismatch" error. | 
|  | 357 | 
|  | 358 Note #5: you can use a |b:var| to set this option on a per buffer basis. | 
|  | 359 | 
|  | 360                                                         *'g:ctrlp_max_history'* | 
|  | 361 The maximum number of input strings you want CtrlP to remember. The default | 
|  | 362 value mirrors Vim's global |'history'| option: > | 
|  | 363   let g:ctrlp_max_history = &history | 
|  | 364 < | 
|  | 365 Set to 0 to disable prompt's history. Browse the history with <c-n> and <c-p>. | 
|  | 366 | 
|  | 367                                                       *'g:ctrlp_open_new_file'* | 
|  | 368 Use this option to specify how the newly created file is to be opened when | 
|  | 369 pressing <c-y>: > | 
|  | 370   let g:ctrlp_open_new_file = 'v' | 
|  | 371 < | 
|  | 372   t - in a new tab. | 
|  | 373   h - in a new horizontal split. | 
|  | 374   v - in a new vertical split. | 
|  | 375   r - in the current window. | 
|  | 376 | 
|  | 377                                                 *'g:ctrlp_open_multiple_files'* | 
|  | 378 If non-zero, this will enable opening multiple files with <c-z> and <c-o>: > | 
|  | 379   let g:ctrlp_open_multiple_files = 'v' | 
|  | 380 < | 
|  | 381 Example: > | 
|  | 382   let g:ctrlp_open_multiple_files = '2vjr' | 
|  | 383 < | 
|  | 384 For the number: | 
|  | 385   - If given, it'll be used as the maximum number of windows or tabs to create | 
|  | 386     when opening the files (the rest will be opened as hidden buffers). | 
|  | 387   - If not given, <c-o> will open all files, each in a new window or new tab. | 
|  | 388 | 
|  | 389 For the letters: | 
|  | 390   t - each file in a new tab. | 
|  | 391   h - each file in a new horizontal split. | 
|  | 392   v - each file in a new vertical split. | 
|  | 393   i - all files as hidden buffers. | 
|  | 394   j - after opening, jump to the first opened tab or window. | 
|  | 395   r - open the first file in the current window, then the remaining files in | 
|  | 396       new splits or new tabs depending on which of "h", "v" and "t" is also | 
|  | 397       present. | 
|  | 398 | 
|  | 399                                                             *'g:ctrlp_arg_map'* | 
|  | 400 When this is set to 1, the <c-o> and <c-y> mappings will accept one extra key | 
|  | 401 as an argument to override their default behavior: > | 
|  | 402   let g:ctrlp_arg_map = 0 | 
|  | 403 < | 
|  | 404 Pressing <c-o> or <c-y> will then prompt for a keypress. The key can be: | 
|  | 405   t - open in tab(s) | 
|  | 406   h - open in horizontal split(s) | 
|  | 407   v - open in vertical split(s) | 
|  | 408   i - open as hidden buffers (for <c-o> only) | 
|  | 409   c - clear the marked files (for <c-o> only) | 
|  | 410   r - open in the current window (for <c-y> only) | 
|  | 411   <esc>, <c-c>, <c-u> - cancel and go back to the prompt. | 
|  | 412   <cr> - use the default behavior specified with |g:ctrlp_open_new_file| and | 
|  | 413   |g:ctrlp_open_multiple_files|. | 
|  | 414 | 
|  | 415                                                     *'g:ctrlp_follow_symlinks'* | 
|  | 416 If non-zero, CtrlP will follow symbolic links when listing files: > | 
|  | 417   let g:ctrlp_follow_symlinks = 0 | 
|  | 418 < | 
|  | 419   0 - don't follow symbolic links. | 
|  | 420   1 - follow but ignore looped internal symlinks to avoid duplicates. | 
|  | 421   2 - follow all symlinks indiscriminately. | 
|  | 422 | 
|  | 423 Note: does not apply when a command defined with |g:ctrlp_user_command| is | 
|  | 424 being used. | 
|  | 425 | 
|  | 426                                                         *'g:ctrlp_lazy_update'* | 
|  | 427 Set this to 1 or bigger to enable the lazy-update feature: only update the | 
|  | 428 match window after typing's been stopped for a certain amount of time: > | 
|  | 429   let g:ctrlp_lazy_update = 0 | 
|  | 430 < | 
|  | 431 If is 1, update after 250ms that value as default tuned. If bigger than 1, the | 
|  | 432 number will be used as the delay time in milliseconds. | 
|  | 433 | 
|  | 434                                                       *'g:ctrlp_default_input'* | 
|  | 435 Set this to 1 to enable seeding the prompt with the current file's relative | 
|  | 436 path: > | 
|  | 437   let g:ctrlp_default_input = 0 | 
|  | 438 < | 
|  | 439 Instead of 1 or 0, if the value of the option is a string, it'll be used as-is | 
|  | 440 as the default input: > | 
|  | 441   let g:ctrlp_default_input = 'anystring' | 
|  | 442 < | 
|  | 443 This option works well together with |g:ctrlp_open_single_match| | 
|  | 444 | 
|  | 445 | 
|  | 446                                                  *'g:ctrlp_match_current_file'* | 
|  | 447 Includes the current file in the match entries: > | 
|  | 448   let g:ctrlp_match_current_file = 1 | 
|  | 449 | 
|  | 450 By default, the current file is excluded from the list. | 
|  | 451 | 
| 739 | 452 Note: With the exception of |:CtrlPMRU|, does not apply when | 
|  | 453 |g:ctrlp_match_func| is used. | 
| 707 | 454 | 
|  | 455                                                               *'g:ctrlp_types'* | 
|  | 456 Set this to list of names to customize core types: > | 
|  | 457   let g:ctrlp_types = ['mru', 'fil'] | 
|  | 458 | 
|  | 459 By default, the types are: > | 
| 739 | 460   let g:ctrlp_types = ['fil', 'buf', 'mru'] | 
| 707 | 461 | 
|  | 462                                                              *'g:ctrlp_abbrev'* | 
|  | 463 Define input abbreviations that can be expanded (either internally or visibly) | 
|  | 464 in the prompt: > | 
|  | 465   let g:ctrlp_abbrev = {} | 
|  | 466 < | 
|  | 467 Examples: > | 
|  | 468   let g:ctrlp_abbrev = { | 
|  | 469     \ 'gmode': 'i', | 
|  | 470     \ 'abbrevs': [ | 
|  | 471       \ { | 
|  | 472         \ 'pattern': '^cd b', | 
|  | 473         \ 'expanded': '@cd ~/.vim/bundle', | 
|  | 474         \ 'mode': 'pfrz', | 
|  | 475       \ }, | 
|  | 476       \ { | 
|  | 477         \ 'pattern': '\(^@.\+\|\\\@<!:.\+\)\@<! ', | 
|  | 478         \ 'expanded': '.\{-}', | 
|  | 479         \ 'mode': 'pfr', | 
|  | 480       \ }, | 
|  | 481       \ { | 
|  | 482         \ 'pattern': '\\\@<!:.\+\zs\\\@<! ', | 
|  | 483         \ 'expanded': '\ ', | 
|  | 484         \ 'mode': 'pfz', | 
|  | 485       \ }, | 
|  | 486       \ ] | 
|  | 487     \ } | 
|  | 488 < | 
|  | 489 The 'pattern' string is regexp matched against the entered input. The expansion | 
|  | 490 is as if the 'expanded' string was typed into the prompt. | 
|  | 491 | 
|  | 492 For 'gmode' (optional): | 
|  | 493   i - expand internally (default). | 
|  | 494   t - insert the expanded results into the prompt as you type. | 
|  | 495   k - insert the expanded results when a non-keyword character is typed. Only | 
|  | 496       applies when "t" is also present. | 
|  | 497 | 
|  | 498 For 'mode' (of each entry; optional): | 
|  | 499   f - only in filename mode. | 
|  | 500   p - only in full path mode. | 
|  | 501   r - only in regexp mode. | 
|  | 502   z - only in fuzzy mode. | 
|  | 503   n - only when creating a new file with <c-y> (use the expanded string in the | 
|  | 504       new filename). | 
|  | 505   c - only when auto-completing directory names with <tab> (expand the pattern | 
|  | 506       immediately before doing the auto-completion). | 
|  | 507   <empty> or not defined - always enable. | 
|  | 508 | 
|  | 509 Note: the abbrev entries are evaluated in sequence, so a later entry can be | 
|  | 510 evaluated against the expanded result of a previous entry; this includes itself | 
|  | 511 when 'gmode' is "t". | 
|  | 512 | 
|  | 513                                                            *'g:ctrlp_key_loop'* | 
|  | 514 An experimental feature. Set this to 1 to enable input looping for the typing | 
|  | 515 of multi-byte characters: > | 
|  | 516   let g:ctrlp_key_loop = 0 | 
|  | 517 < | 
|  | 518 Note #1: when set, this option resets the |g:ctrlp_lazy_update| option. | 
|  | 519 | 
|  | 520 Note #2: you can toggle this feature inside the prompt with a custom mapping: > | 
|  | 521   let g:ctrlp_prompt_mappings = { 'ToggleKeyLoop()': ['<F3>'] } | 
|  | 522 < | 
|  | 523 | 
|  | 524                                                     *'g:ctrlp_prompt_mappings'* | 
|  | 525 Use this to customize the mappings inside CtrlP's prompt to your liking. You | 
|  | 526 only need to keep the lines that you've changed the values (inside []): > | 
|  | 527   let g:ctrlp_prompt_mappings = { | 
|  | 528     \ 'PrtBS()':              ['<bs>', '<c-]>'], | 
|  | 529     \ 'PrtDelete()':          ['<del>'], | 
|  | 530     \ 'PrtDeleteWord()':      ['<c-w>'], | 
|  | 531     \ 'PrtClear()':           ['<c-u>'], | 
|  | 532     \ 'PrtSelectMove("j")':   ['<c-j>', '<down>'], | 
|  | 533     \ 'PrtSelectMove("k")':   ['<c-k>', '<up>'], | 
|  | 534     \ 'PrtSelectMove("t")':   ['<Home>', '<kHome>'], | 
|  | 535     \ 'PrtSelectMove("b")':   ['<End>', '<kEnd>'], | 
|  | 536     \ 'PrtSelectMove("u")':   ['<PageUp>', '<kPageUp>'], | 
|  | 537     \ 'PrtSelectMove("d")':   ['<PageDown>', '<kPageDown>'], | 
|  | 538     \ 'PrtHistory(-1)':       ['<c-n>'], | 
|  | 539     \ 'PrtHistory(1)':        ['<c-p>'], | 
|  | 540     \ 'AcceptSelection("e")': ['<cr>', '<2-LeftMouse>'], | 
|  | 541     \ 'AcceptSelection("h")': ['<c-x>', '<c-cr>', '<c-s>'], | 
|  | 542     \ 'AcceptSelection("t")': ['<c-t>'], | 
|  | 543     \ 'AcceptSelection("v")': ['<c-v>', '<RightMouse>'], | 
|  | 544     \ 'ToggleFocus()':        ['<s-tab>'], | 
|  | 545     \ 'ToggleRegex()':        ['<c-r>'], | 
|  | 546     \ 'ToggleByFname()':      ['<c-d>'], | 
|  | 547     \ 'ToggleType(1)':        ['<c-f>', '<c-up>'], | 
|  | 548     \ 'ToggleType(-1)':       ['<c-b>', '<c-down>'], | 
|  | 549     \ 'PrtExpandDir()':       ['<tab>'], | 
|  | 550     \ 'PrtInsert("c")':       ['<MiddleMouse>', '<insert>'], | 
|  | 551     \ 'PrtInsert()':          ['<c-\>'], | 
|  | 552     \ 'PrtCurStart()':        ['<c-a>'], | 
|  | 553     \ 'PrtCurEnd()':          ['<c-e>'], | 
|  | 554     \ 'PrtCurLeft()':         ['<c-h>', '<left>', '<c-^>'], | 
|  | 555     \ 'PrtCurRight()':        ['<c-l>', '<right>'], | 
|  | 556     \ 'PrtClearCache()':      ['<F5>'], | 
|  | 557     \ 'PrtDeleteEnt()':       ['<F7>'], | 
|  | 558     \ 'CreateNewFile()':      ['<c-y>'], | 
|  | 559     \ 'MarkToOpen()':         ['<c-z>'], | 
|  | 560     \ 'OpenMulti()':          ['<c-o>'], | 
|  | 561     \ 'PrtExit()':            ['<esc>', '<c-c>', '<c-g>'], | 
|  | 562     \ } | 
|  | 563 < | 
|  | 564 Note: if pressing <bs> moves the cursor one character to the left instead of | 
|  | 565 deleting a character for you, add this to your |.vimrc| to disable the plugin's | 
|  | 566 default <c-h> mapping: > | 
|  | 567   let g:ctrlp_prompt_mappings = { 'PrtCurLeft()': ['<left>', '<c-^>'] } | 
|  | 568 < | 
|  | 569 | 
|  | 570                                                     *'g:ctrlp_line_prefix'* | 
|  | 571 This prefix will be prepended to each line in ctrlp's item listing. | 
|  | 572 default: > | 
|  | 573   let g:ctrlp_line_prefix = '> ' | 
|  | 574 < | 
|  | 575 | 
|  | 576                                                     *'g:ctrlp_open_single_match'* | 
|  | 577 List of CtrlP modes for which CtrlP should accept an entry directly, if only | 
|  | 578 one candidate exists. | 
|  | 579 Example: > | 
|  | 580   let g:ctrlp_open_single_match = ['buffer tags', 'buffer'] | 
|  | 581 < | 
|  | 582 This is currently only really useful together with |g:ctrlp_default_input| | 
|  | 583 set before launching, and cleared afterwards, with a function such as | 
|  | 584 following: > | 
|  | 585   fu! <SID>tagsUnderCursor() | 
|  | 586     try | 
|  | 587       let default_input_save = get(g:, 'ctrlp_default_input', '') | 
|  | 588       let g:ctrlp_default_input = expand('<cword>') | 
|  | 589       CtrlPBufTagAll | 
|  | 590     finally | 
|  | 591       if exists('default_input_save') | 
|  | 592         let g:ctrlp_default_input = default_input_save | 
|  | 593       endif | 
|  | 594     endtry | 
|  | 595   endfu | 
|  | 596 > | 
|  | 597 < | 
|  | 598 ---------------------------------------- | 
|  | 599 MRU mode options:~ | 
|  | 600 | 
|  | 601                                                            *'g:ctrlp_mruf_max'* | 
|  | 602 Specify the number of recently opened files you want CtrlP to remember: > | 
|  | 603   let g:ctrlp_mruf_max = 250 | 
|  | 604 < | 
|  | 605 | 
|  | 606                                                        *'g:ctrlp_mruf_exclude'* | 
|  | 607 Files you don't want CtrlP to remember. Use regexp to specify the patterns: > | 
|  | 608   let g:ctrlp_mruf_exclude = '' | 
|  | 609 < | 
|  | 610 Examples: > | 
|  | 611   let g:ctrlp_mruf_exclude = '/tmp/.*\|/temp/.*' " MacOSX/Linux | 
|  | 612   let g:ctrlp_mruf_exclude = '^C:\\dev\\tmp\\.*' " Windows | 
|  | 613 < | 
|  | 614 | 
|  | 615                                                        *'g:ctrlp_mruf_include'* | 
|  | 616 And if you want CtrlP to only remember some files, specify them here: > | 
|  | 617   let g:ctrlp_mruf_include = '' | 
|  | 618 < | 
|  | 619 Example: > | 
|  | 620   let g:ctrlp_mruf_include = '\.py$\|\.rb$' | 
|  | 621 < | 
|  | 622 | 
|  | 623                                                  *'g:ctrlp_tilde_homedir'* | 
|  | 624 Set this to 1 to save every MRU file path $HOME/$filepath in the $HOME dir | 
|  | 625   as ~/$filepath instead of $HOME/$filepath : > | 
|  | 626   let g:ctrlp_tilde_homedir = 0 | 
|  | 627 < | 
|  | 628 Note: This applies also to all dir paths stored by :CtrlPBookmarkDirAdd! | 
|  | 629 | 
|  | 630                                                       *'g:ctrlp_mruf_relative'* | 
|  | 631 Set this to 1 to show only MRU files in the current working directory: > | 
|  | 632   let g:ctrlp_mruf_relative = 0 | 
|  | 633 < | 
|  | 634 Note: you can use a custom mapping to toggle this option inside the prompt: > | 
|  | 635   let g:ctrlp_prompt_mappings = { 'ToggleMRURelative()': ['<F2>'] } | 
|  | 636 < | 
|  | 637                                                  *'g:ctrlp_mruf_default_order'* | 
|  | 638 Set this to 1 to disable sorting when searching in MRU mode: > | 
|  | 639   let g:ctrlp_mruf_default_order = 0 | 
|  | 640 < | 
|  | 641 | 
|  | 642                                                 *'g:ctrlp_mruf_case_sensitive'* | 
|  | 643 Match this with your file system case-sensitivity setting to avoid duplicate | 
|  | 644 MRU entries: > | 
|  | 645   let g:ctrlp_mruf_case_sensitive = 1 | 
|  | 646 < | 
|  | 647 | 
|  | 648                                                 *'g:ctrlp_mruf_save_on_update'* | 
|  | 649 Set this to 0 to disable saving of the MRU list to hard drive whenever a new | 
|  | 650 entry is added, saving will then only occur when exiting Vim: > | 
|  | 651   let g:ctrlp_mruf_save_on_update = 1 | 
|  | 652 < | 
|  | 653                                                 *'g:ctrlp_bufname_mod'* | 
|  | 654 Modify file name section according to modificator string. See |filename-modifiers|. > | 
|  | 655   let g:ctrlp_bufname_mod = ':t' | 
|  | 656 < | 
|  | 657                                                 *'g:ctrlp_bufpath_mod'* | 
|  | 658 Modify file path section according to modificator string. See |filename-modifiers|. > | 
|  | 659   let g:ctrlp_bufpath_mod = ':~:.:h' | 
|  | 660 < | 
|  | 661 ---------------------------------------- | 
|  | 662 Advanced options:~ | 
|  | 663 | 
|  | 664                                                           *'g:ctrlp_open_func'* | 
|  | 665 Define a custom function to open the selected file: > | 
|  | 666   let g:ctrlp_open_func = {} | 
|  | 667 < | 
|  | 668 Example: > | 
|  | 669   let g:ctrlp_open_func = { | 
|  | 670     \ 'files'     : 'Function_Name_1', | 
|  | 671     \ 'buffers'   : 'Function_Name_2', | 
|  | 672     \ 'mru files' : 'Function_Name_3', | 
|  | 673     \ } | 
|  | 674 < | 
|  | 675 Structure of the functions: > | 
|  | 676   function! Function_Name(action, line) | 
|  | 677     " Arguments: | 
|  | 678     " | | 
|  | 679     " +- a:action : The opening action: | 
|  | 680     " |             + 'e' : user pressed <cr>  (default) | 
|  | 681     " |             + 'h' : user pressed <c-x> (default) | 
|  | 682     " |             + 'v' : user pressed <c-v> (default) | 
|  | 683     " |             + 't' : user pressed <c-t> (default) | 
|  | 684     " |             + 'x' : user used the <c-o> console dialog (default) and | 
|  | 685     " |                     chose "e[x]ternal". | 
|  | 686     " | | 
|  | 687     " +- a:line   : The selected line. | 
|  | 688 | 
|  | 689   endfunction | 
|  | 690 < | 
|  | 691 Note: does not apply when opening multiple files with <c-z> and <c-o>. | 
|  | 692 | 
|  | 693 Example: open HTML files in the default web browser when <c-t> is pressed and | 
|  | 694 in Vim otherwise > | 
|  | 695   function! HTMLOpenFunc(action, line) | 
|  | 696     if a:action =~ '^[tx]$' && fnamemodify(a:line, ':e') =~? '^html\?$' | 
|  | 697 | 
|  | 698       " Get the filename | 
|  | 699       let filename = fnameescape(fnamemodify(a:line, ':p')) | 
|  | 700 | 
|  | 701       " Close CtrlP | 
|  | 702       call ctrlp#exit() | 
|  | 703 | 
|  | 704       " Open the file | 
|  | 705       silent! execute '!xdg-open' filename | 
|  | 706 | 
|  | 707     elseif a:action == 'x' && fnamemodify(a:line, ':e') !~? '^html\?$' | 
|  | 708 | 
|  | 709       " Not a HTML file, simulate pressing <c-o> again and wait for new input | 
|  | 710       call feedkeys("\<c-o>") | 
|  | 711 | 
|  | 712     else | 
|  | 713 | 
|  | 714       " Use CtrlP's default file opening function | 
|  | 715       call call('ctrlp#acceptfile', [a:action, a:line]) | 
|  | 716 | 
|  | 717     endif | 
|  | 718   endfunction | 
|  | 719 | 
|  | 720   let g:ctrlp_open_func = { 'files': 'HTMLOpenFunc' } | 
|  | 721 < | 
|  | 722 | 
|  | 723                                                         *'g:ctrlp_status_func'* | 
|  | 724 Use this to customize the statuslines for the CtrlP window: > | 
|  | 725   let g:ctrlp_status_func = {} | 
|  | 726 < | 
|  | 727 Example: > | 
|  | 728   let g:ctrlp_status_func = { | 
|  | 729     \ 'main': 'Function_Name_1', | 
|  | 730     \ 'prog': 'Function_Name_2', | 
|  | 731     \ } | 
|  | 732 < | 
|  | 733 Structure of the functions: > | 
|  | 734   " Main statusline | 
|  | 735   function! Function_Name_1(focus, byfname, regex, prev, item, next, marked) | 
|  | 736     " Arguments: | 
|  | 737     " | | 
|  | 738     " +- a:focus   : The focus of the prompt: "prt" or "win". | 
|  | 739     " | | 
|  | 740     " +- a:byfname : In filename mode or in full path mode: "file" or "path". | 
|  | 741     " | | 
|  | 742     " +- a:regex   : In regex mode: 1 or 0. | 
|  | 743     " | | 
|  | 744     " +- a:prev    : The previous search mode. | 
|  | 745     " | | 
|  | 746     " +- a:item    : The current search mode. | 
|  | 747     " | | 
|  | 748     " +- a:next    : The next search mode. | 
|  | 749     " | | 
|  | 750     " +- a:marked  : The number of marked files, or a comma separated list of | 
|  | 751     "                the marked filenames. | 
|  | 752 | 
|  | 753     return full_statusline | 
|  | 754   endfunction | 
|  | 755 | 
|  | 756   " Progress statusline | 
|  | 757   function! Function_Name_2(str) | 
|  | 758     " a:str : Either the number of files scanned so far, or a string indicating | 
|  | 759     "         the current directory is being scanned with a user_command. | 
|  | 760 | 
|  | 761     return full_statusline | 
|  | 762   endfunction | 
|  | 763 < | 
|  | 764 See https://gist.github.com/1610859 for a working example. | 
|  | 765 | 
|  | 766                                                         *'g:ctrlp_buffer_func'* | 
|  | 767 Specify the functions that will be called after entering and before exiting the | 
|  | 768 CtrlP buffer: > | 
|  | 769   let g:ctrlp_buffer_func = {} | 
|  | 770 < | 
|  | 771 Example: > | 
|  | 772   let g:ctrlp_buffer_func = { | 
|  | 773     \ 'enter': 'Function_Name_1', | 
|  | 774     \ 'exit':  'Function_Name_2', | 
|  | 775     \ } | 
|  | 776 < | 
|  | 777 | 
|  | 778                                                          *'g:ctrlp_match_func'* | 
|  | 779 Set an external fuzzy matching function for CtrlP to use: > | 
|  | 780   let g:ctrlp_match_func = {} | 
|  | 781 < | 
|  | 782 Example: > | 
|  | 783   let g:ctrlp_match_func = { 'match': 'Function_Name' } | 
|  | 784 < | 
|  | 785 Structure of the function: > | 
|  | 786   function! Function_Name(items, str, limit, mmode, ispath, crfile, regex) | 
|  | 787     " Arguments: | 
|  | 788     " | | 
|  | 789     " +- a:items  : The full list of items to search in. | 
|  | 790     " | | 
|  | 791     " +- a:str    : The string entered by the user. | 
|  | 792     " | | 
|  | 793     " +- a:limit  : The max height of the match window. Can be used to limit | 
|  | 794     " |             the number of items to return. | 
|  | 795     " | | 
|  | 796     " +- a:mmode  : The match mode. Can be one of these strings: | 
|  | 797     " |             + "full-line": match the entire line. | 
|  | 798     " |             + "filename-only": match only the filename. | 
|  | 799     " |             + "first-non-tab": match until the first tab char. | 
|  | 800     " |             + "until-last-tab": match until the last tab char. | 
|  | 801     " | | 
|  | 802     " +- a:ispath : Is 1 when searching in file, buffer, mru, mixed, dir, and | 
|  | 803     " |             rtscript modes. Is 0 otherwise. | 
|  | 804     " | | 
|  | 805     " +- a:crfile : The file in the current window. Should be excluded from the | 
|  | 806     " |             results when a:ispath == 1. | 
|  | 807     " | | 
|  | 808     " +- a:regex  : In regex mode: 1 or 0. | 
|  | 809 | 
|  | 810     return list_of_matched_items | 
|  | 811   endfunction | 
|  | 812 < | 
|  | 813 | 
|  | 814 Note: you can extend any of the above options with { 'arg_type': 'dict' } to | 
|  | 815 enable passing all the function arguments in a single Dictionary argument. Use | 
|  | 816 the existing argument names as keys in this Dictionary. | 
|  | 817 | 
|  | 818 Example: > | 
|  | 819   let g:ctrlp_status_func = { | 
|  | 820     \ 'arg_type' : 'dict', | 
|  | 821     \ 'enter': 'Function_Name_1', | 
|  | 822     \ 'exit':  'Function_Name_2', | 
|  | 823     \ } | 
|  | 824 | 
|  | 825   function! Function_Name_1(dict) | 
|  | 826     " where dict == { | 
|  | 827     " \ 'focus':   value, | 
|  | 828     " \ 'byfname': value, | 
|  | 829     " \ 'regex':   value, | 
|  | 830     " \ ... | 
|  | 831     " } | 
|  | 832   endfunction | 
|  | 833 < | 
|  | 834                                                        *'g:ctrlp_brief_prompt'* | 
|  | 835 When this is set to 1, the <bs> on empty prompt exit CtrlP. | 
|  | 836 | 
|  | 837                                                         *'g:ctrlp_use_readdir'* | 
|  | 838 Unlike kien/ctrlp.vim, ctrlpvim/ctrlp.vim uses readdir() instead of globpath() | 
|  | 839 for speed. Set this option to 0 if you want to revert to the original | 
|  | 840 behavior. | 
|  | 841 Example: > | 
|  | 842   let g:ctrlp_use_readdir = 0 | 
|  | 843 < | 
|  | 844                                                           *ctrlp-default-value* | 
|  | 845 Otherwise, you can use below to change default value. | 
|  | 846 Example: > | 
|  | 847   let g:ctrlp_path_nolim = 1 | 
|  | 848 | 
|  | 849 This is possible to change no-limit mode for match type "path". | 
|  | 850 | 
|  | 851                                                           *ctrlp_compare_lim* | 
|  | 852 If your search directory has more number of files than this limit, no sorting | 
|  | 853 will be performed for the first readout. You can improve CtrlP performance by | 
|  | 854 setting this to a proper value, but no sorting on the first readout can reduce | 
|  | 855 the quality of fuzzy finding results. | 
|  | 856 Example: | 
|  | 857   let g:ctrlp_compare_lim = 100 | 
|  | 858 | 
|  | 859 Set the value to 0 for unlimited sorting. Default is 0. | 
|  | 860 | 
|  | 861 | 
|  | 862 =============================================================================== | 
|  | 863 COMMANDS                                                       *ctrlp-commands* | 
|  | 864 | 
|  | 865                                                                        *:CtrlP* | 
|  | 866 :CtrlP [starting-directory] | 
|  | 867    Open CtrlP in find file mode. | 
|  | 868 | 
|  | 869    If no argument is given, the value of |g:ctrlp_working_path_mode| will be | 
|  | 870    used to determine the starting directory.  See |:CtrlPCurFile| and | 
|  | 871    |:CtrlPCurWD| to temporarily override the setting. | 
|  | 872 | 
|  | 873    You can use <tab> to auto-complete the [starting-directory] when typing it. | 
|  | 874 | 
|  | 875                                                                  *:CtrlPBuffer* | 
|  | 876 :CtrlPBuffer | 
|  | 877    Open CtrlP in find buffer mode. | 
|  | 878 | 
|  | 879                                                                 *:CtrlPCurFile* | 
|  | 880 :CtrlPCurFile | 
|  | 881     This acts like |:CtrlP| with |g:ctrlp_working_path_mode| = 'c' and ignores | 
|  | 882     the variable's current value. | 
|  | 883 | 
|  | 884                                                                   *:CtrlPCurWD* | 
|  | 885 :CtrlPCurWD | 
|  | 886     This acts like |:CtrlP| with |g:ctrlp_working_path_mode| = 'd' and ignores | 
|  | 887     the variable's current value. | 
|  | 888 | 
|  | 889                                                                     *:CtrlPMRU* | 
|  | 890 :CtrlPMRU | 
|  | 891    Open CtrlP in find Most-Recently-Used file mode. | 
|  | 892 | 
|  | 893                                                                *:CtrlPLastMode* | 
|  | 894 :CtrlPLastMode [--dir] | 
|  | 895    Open CtrlP in the last mode used. When having the "--dir" argument, also | 
|  | 896    reuse the last working directory. | 
|  | 897 | 
|  | 898                                                                    *:CtrlPRoot* | 
|  | 899 :CtrlPRoot | 
|  | 900     This acts like |:CtrlP| with |g:ctrlp_working_path_mode| = 'r' and ignores | 
|  | 901     the variable's current value. | 
|  | 902 | 
|  | 903                                                              *:CtrlPClearCache* | 
|  | 904 :CtrlPClearCache | 
|  | 905    Flush the cache for the current working directory. The same as pressing <F5> | 
|  | 906    inside CtrlP. | 
|  | 907    To enable or disable caching, use the |g:ctrlp_use_caching| option. | 
|  | 908 | 
|  | 909                                                          *:CtrlPClearAllCaches* | 
|  | 910 :CtrlPClearAllCaches | 
|  | 911    Delete all the cache files saved in |g:ctrlp_cache_dir| location. | 
|  | 912 | 
|  | 913 ------------------------------------------------------------------------------- | 
|  | 914 For commands provided by bundled extensions, see |ctrlp-extensions|. | 
|  | 915 | 
|  | 916 =============================================================================== | 
|  | 917 MAPPINGS                                                       *ctrlp-mappings* | 
|  | 918 | 
|  | 919                                                                 *'ctrlp-<c-p>'* | 
|  | 920 <c-p> | 
|  | 921    Default |Normal| mode mapping to open the CtrlP prompt in find file mode. | 
|  | 922 | 
|  | 923 ---------------------------------------- | 
|  | 924 Once inside the prompt:~ | 
|  | 925 | 
|  | 926   <c-d> | 
|  | 927     Toggle between full-path search and filename only search. | 
|  | 928     Note: in filename mode, the prompt's base is '>d>' instead of '>>>' | 
|  | 929 | 
|  | 930   <c-r>                                                    *'ctrlp-fullregexp'* | 
|  | 931     Toggle between the string mode and full regexp mode. | 
|  | 932     Note: in full regexp mode, the prompt's base is 'r>>' instead of '>>>' | 
|  | 933 | 
|  | 934     See also: |input-formats| (guide) and |g:ctrlp_regexp_search| (option). | 
|  | 935 | 
|  | 936   <c-f>, 'forward' | 
|  | 937   <c-up> | 
|  | 938     Scroll to the 'next' search mode in the sequence. | 
|  | 939 | 
|  | 940   <c-b>, 'backward' | 
|  | 941   <c-down> | 
|  | 942     Scroll to the 'previous' search mode in the sequence. | 
|  | 943 | 
|  | 944   <tab>                                                *'ctrlp-autocompletion'* | 
|  | 945     Auto-complete directory names under the current working directory inside | 
|  | 946     the prompt. | 
|  | 947 | 
|  | 948   <s-tab> | 
|  | 949     Toggle the focus between the match window and the prompt. | 
|  | 950 | 
|  | 951   <esc>, | 
|  | 952   <c-c>, | 
|  | 953   <c-g> | 
|  | 954     Exit CtrlP. | 
|  | 955 | 
|  | 956 Moving:~ | 
|  | 957 | 
|  | 958   <c-j>, | 
|  | 959   <down> | 
|  | 960     Move selection down. | 
|  | 961 | 
|  | 962   <c-k>, | 
|  | 963   <up> | 
|  | 964     Move selection up. | 
|  | 965 | 
|  | 966   <c-a> | 
|  | 967     Move the cursor to the 'start' of the prompt. | 
|  | 968 | 
|  | 969   <c-e> | 
|  | 970     Move the cursor to the 'end' of the prompt. | 
|  | 971 | 
|  | 972   <c-h>, | 
|  | 973   <left>, | 
|  | 974   <c-^> | 
|  | 975     Move the cursor one character to the 'left'. | 
|  | 976 | 
|  | 977   <c-l>, | 
|  | 978   <right> | 
|  | 979     Move the cursor one character to the 'right'. | 
|  | 980 | 
|  | 981 Editing:~ | 
|  | 982 | 
|  | 983   <c-]>, | 
|  | 984   <bs> | 
|  | 985     Delete the preceding character. | 
|  | 986 | 
|  | 987   <del> | 
|  | 988     Delete the current character. | 
|  | 989 | 
|  | 990   <c-w> | 
|  | 991     Delete a preceding inner word. | 
|  | 992 | 
|  | 993   <c-u> | 
|  | 994     Clear the input field. | 
|  | 995 | 
|  | 996 Browsing input history:~ | 
|  | 997 | 
|  | 998   <c-n> | 
|  | 999     Next string in the prompt's history. | 
|  | 1000 | 
|  | 1001   <c-p> | 
|  | 1002     Previous string in the prompt's history. | 
|  | 1003 | 
|  | 1004 Opening/Creating a file:~ | 
|  | 1005 | 
|  | 1006   <cr> | 
|  | 1007     Open the selected file in the 'current' window if possible. | 
|  | 1008 | 
|  | 1009   <c-t> | 
|  | 1010     Open the selected file in a new 'tab'. | 
|  | 1011 | 
|  | 1012   <c-v> | 
|  | 1013     Open the selected file in a 'vertical' split. | 
|  | 1014 | 
|  | 1015   <c-x>, | 
|  | 1016   <c-cr>, | 
|  | 1017   <c-s> | 
|  | 1018     Open the selected file in a 'horizontal' split. | 
|  | 1019 | 
|  | 1020   <c-y> | 
|  | 1021     Create a new file and its parent directories. | 
|  | 1022 | 
|  | 1023 Opening multiple files:~ | 
|  | 1024 | 
|  | 1025   <c-z> | 
|  | 1026     - Mark/unmark a file to be opened with <c-o>. | 
|  | 1027     - Mark/unmark a file to create a new file in its directory using <c-y>. | 
|  | 1028 | 
|  | 1029   <c-o> | 
|  | 1030     - Open files marked by <c-z>. | 
|  | 1031     - When no file has been marked by <c-z>, open a console dialog with the | 
|  | 1032       following options: | 
|  | 1033 | 
|  | 1034       Open the selected file: | 
|  | 1035         t - in a tab page. | 
|  | 1036         v - in a vertical split. | 
|  | 1037         h - in a horizontal split. | 
|  | 1038         r - in the current window. | 
|  | 1039         i - as a hidden buffer. | 
|  | 1040         x - (optional) with the function defined in |g:ctrlp_open_func|. | 
|  | 1041 | 
|  | 1042       Other options (not shown): | 
|  | 1043         a - mark all files in the match window. | 
|  | 1044         d - change CtrlP's local working directory to the selected file's | 
|  | 1045             directory and switch to find file mode. | 
|  | 1046 | 
|  | 1047 Function keys:~ | 
|  | 1048 | 
|  | 1049   <F5> | 
|  | 1050     - Refresh the match window and purge the cache for the current directory. | 
|  | 1051     - Remove deleted files from the MRU list. | 
|  | 1052 | 
|  | 1053   <F7> | 
|  | 1054     MRU mode: | 
|  | 1055     - Wipe the list. | 
|  | 1056     - Delete entries marked by <c-z>. | 
|  | 1057     Buffer mode: | 
|  | 1058     - Delete entry under the cursor or delete multiple entries marked by <c-z>. | 
|  | 1059 | 
|  | 1060 | 
|  | 1061 Pasting:~ | 
|  | 1062 | 
|  | 1063   <Insert>,                                                   *'ctrlp-pasting'* | 
|  | 1064   <MiddleMouse> | 
|  | 1065     Paste the clipboard content into the prompt. | 
|  | 1066 | 
|  | 1067   <c-\> | 
|  | 1068     Open a console dialog to paste <cword>, <cfile>, the content of the search | 
|  | 1069     register, the last visual selection, the clipboard or any register into the | 
|  | 1070     prompt. | 
|  | 1071 | 
|  | 1072 Choose your own mappings with |g:ctrlp_prompt_mappings|. | 
|  | 1073 | 
|  | 1074 ---------------------------------------- | 
|  | 1075 When inside the match window (press <s-tab> to switch):~ | 
|  | 1076 | 
|  | 1077   a-z | 
|  | 1078   0-9 | 
|  | 1079   ~^-=;`',.+!@#$%&_(){}[] | 
|  | 1080     Cycle through the lines which have the matching first character. | 
|  | 1081 | 
|  | 1082 =============================================================================== | 
|  | 1083 INPUT FORMATS                                             *ctrlp-input-formats* | 
|  | 1084 | 
|  | 1085 Formats for inputting in the prompt:~ | 
|  | 1086 | 
|  | 1087 a)  Simple string. | 
|  | 1088 | 
|  | 1089     E.g. 'abc' is understood internally as 'a[^a]\{-}b[^b]\{-}c' | 
|  | 1090 | 
|  | 1091 b)  When in regexp mode, the input string's treated as a Vim's regexp |pattern| | 
|  | 1092     without any modification. | 
|  | 1093 | 
|  | 1094     E.g. 'abc\d*efg' will be read as 'abc\d*efg'. | 
|  | 1095 | 
|  | 1096     See |ctrlp-fullregexp| (keymap) and |g:ctrlp_regexp_search| (option) for | 
|  | 1097     how to enable regexp mode. | 
|  | 1098 | 
|  | 1099 c)  End the string with a colon ':' followed by a Vim command to execute that | 
|  | 1100     command after opening the file. If you need to use ':' literally, escape it | 
|  | 1101     with a backslash: '\:'. When opening multiple files, the command will be | 
|  | 1102     executed on each opening file. | 
|  | 1103 | 
|  | 1104     E.g. Use ':45' to jump to line 45. | 
|  | 1105 | 
|  | 1106          Use ':/any\:string' to jump to the first instance of 'any:string'. | 
|  | 1107 | 
|  | 1108          Use ':+setf\ myfiletype|50' to set the filetype to 'myfiletype', then | 
|  | 1109          jump to line 50. | 
|  | 1110 | 
|  | 1111          Use ':diffthis' when opening multiple files to run |:diffthis| on the | 
|  | 1112          first 4 files. | 
|  | 1113 | 
|  | 1114     See also: Vim's |++opt| and |+cmd|. | 
|  | 1115 | 
|  | 1116 d)  Input two dots '..' and then hit the <Enter> key to go upward the directory tree by 1 level. To go up | 
|  | 1117     multiple levels, use one extra dot for each extra level: | 
|  | 1118 > | 
|  | 1119          Raw input    Interpreted as | 
|  | 1120          ..<Cr>           ../ | 
|  | 1121          ...<Cr>          ../../ | 
|  | 1122          ....<Cr>         ../../../ | 
|  | 1123 < | 
|  | 1124     Note: if the parent directories are large and uncached, this can be slow. | 
|  | 1125 | 
|  | 1126     You can also use '@cd path/' to change CtrlP's local working directory. | 
|  | 1127     Use '@cd %:h' to change to the directory of the current file. | 
|  | 1128 | 
|  | 1129 e)  Similarly, submit '/' or '\' to find and go to the project's root. | 
|  | 1130 | 
|  | 1131     If the project is large, using a VCS listing command to look for files | 
|  | 1132     might help speeding up the initial scan (see |g:ctrlp_user_command| for more | 
|  | 1133     details). | 
|  | 1134 | 
|  | 1135     Note: d) and e) only work in file, directory and mixed modes. | 
|  | 1136 | 
|  | 1137 f)  Type the name of a non-existent file and press <c-y> to create it. Mark a | 
|  | 1138     file with <c-z> to create the new file in the same directory as the marked | 
|  | 1139     file. | 
|  | 1140 | 
|  | 1141     E.g. Using 'newdir/newfile.txt' will create a directory named 'newdir' as | 
|  | 1142          well as a file named 'newfile.txt'. | 
|  | 1143 | 
|  | 1144          If an entry 'some/old/dirs/oldfile.txt' is marked with <c-z>, then | 
|  | 1145          'newdir' and 'newfile.txt' will be created under 'some/old/dirs'. The | 
|  | 1146          final path will then be 'some/old/dirs/newdir/newfile.txt'. | 
|  | 1147 | 
|  | 1148     Note: use '\' in place of '/' on Windows (if |'shellslash'| is not set). | 
|  | 1149 | 
|  | 1150 g)  In filename mode (toggle with <c-d>), you can use one primary pattern and | 
|  | 1151     one refining pattern separated by a semicolon. Both patterns work like (a), | 
|  | 1152     or (b) when in regexp mode. | 
|  | 1153 | 
|  | 1154 h)  Submit ? to open this help file. | 
|  | 1155 | 
|  | 1156 =============================================================================== | 
|  | 1157 EXTENSIONS                                                   *ctrlp-extensions* | 
|  | 1158 | 
|  | 1159 Extensions are optional. To enable an extension, add its name to the variable | 
|  | 1160 g:ctrlp_extensions: > | 
|  | 1161   let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'dir', 'rtscript', | 
|  | 1162                           \ 'undo', 'line', 'changes', 'mixed', 'bookmarkdir'] | 
|  | 1163 < | 
|  | 1164 The order of the items will be the order they appear on the statusline and when | 
|  | 1165 using <c-f>, <c-b>. | 
|  | 1166 | 
|  | 1167 Available extensions:~ | 
|  | 1168 | 
|  | 1169                                                                     *:CtrlPTag* | 
|  | 1170   * Tag mode:~ | 
|  | 1171     - Name: 'tag' | 
|  | 1172     - Command: ":CtrlPTag" | 
|  | 1173     - Search for a tag within a generated central tags file, and jump to the | 
|  | 1174       definition. Use the Vim's option |'tags'| to specify the names and the | 
|  | 1175       locations of the tags file(s). | 
|  | 1176       E.g. set tags+=doc/tags | 
|  | 1177 | 
|  | 1178                                                                  *:CtrlPBufTag* | 
|  | 1179                                                               *:CtrlPBufTagAll* | 
|  | 1180   * Buffer Tag mode:~ | 
|  | 1181     - Name: 'buffertag' | 
|  | 1182     - Commands: ":CtrlPBufTag [buffer]", | 
|  | 1183                 ":CtrlPBufTagAll". | 
|  | 1184     - Search for a tag within the current buffer or all listed buffers and jump | 
|  | 1185       to the definition. Requires |exuberant_ctags| or compatible programs. | 
|  | 1186 | 
|  | 1187                                                                *:CtrlPQuickfix* | 
|  | 1188   * Quickfix mode:~ | 
|  | 1189     - Name: 'quickfix' | 
|  | 1190     - Command: ":CtrlPQuickfix" | 
|  | 1191     - Search for an entry in the current quickfix errors and jump to it. | 
|  | 1192 | 
|  | 1193                                                                     *:CtrlPDir* | 
|  | 1194   * Directory mode:~ | 
|  | 1195     - Name: 'dir' | 
|  | 1196     - Command: ":CtrlPDir [starting-directory]" | 
|  | 1197     - Search for a directory and change the working directory to it. | 
|  | 1198     - Mappings: | 
|  | 1199       + <cr> change the local working directory for CtrlP and keep it open. | 
|  | 1200       + <c-t> change the global working directory (exit). | 
|  | 1201       + <c-v> change the local working directory for the current window (exit). | 
|  | 1202       + <c-x> change the global working directory to CtrlP's current local | 
|  | 1203         working directory (exit). | 
|  | 1204 | 
|  | 1205                                                                     *:CtrlPRTS* | 
|  | 1206   * Runtime script mode:~ | 
|  | 1207     - Name: 'rtscript' | 
|  | 1208     - Command: ":CtrlPRTS" | 
|  | 1209     - Search for files (vimscripts, docs, snippets...) in runtimepath. | 
|  | 1210 | 
|  | 1211                                                                    *:CtrlPUndo* | 
|  | 1212   * Undo mode:~ | 
|  | 1213     - Name: 'undo' | 
|  | 1214     - Command: ":CtrlPUndo" | 
|  | 1215     - Browse undo history. | 
|  | 1216 | 
|  | 1217                                                                    *:CtrlPLine* | 
|  | 1218   * Line mode:~ | 
|  | 1219     - Name: 'line' | 
|  | 1220     - Command: ":CtrlPLine [buffer]" | 
|  | 1221     - Search for a line in all listed buffers or in the specified [buffer]. | 
|  | 1222 | 
|  | 1223                                                                  *:CtrlPChange* | 
|  | 1224                                                               *:CtrlPChangeAll* | 
|  | 1225   * Change list mode:~ | 
|  | 1226     - Name: 'changes' | 
|  | 1227     - Commands: ":CtrlPChange [buffer]", | 
|  | 1228                 ":CtrlPChangeAll". | 
|  | 1229     - Search for and jump to a recent change in the current buffer or in all | 
|  | 1230       listed buffers. | 
|  | 1231 | 
|  | 1232                                                                   *:CtrlPMixed* | 
|  | 1233   * Mixed mode:~ | 
|  | 1234     - Name: 'mixed' | 
|  | 1235     - Command: ":CtrlPMixed" | 
|  | 1236     - Search in files, buffers and MRU files at the same time. | 
|  | 1237 | 
|  | 1238                                                             *:CtrlPBookmarkDir* | 
|  | 1239                                                          *:CtrlPBookmarkDirAdd* | 
|  | 1240   * BookmarkDir mode:~ | 
|  | 1241     - Name: 'bookmarkdir' | 
|  | 1242     - Commands: ":CtrlPBookmarkDir", | 
|  | 1243                 ":CtrlPBookmarkDirAdd  [directory] [TITLE]". | 
|  | 1244                 ":CtrlPBookmarkDirAdd! [directory] [TITLE]". | 
|  | 1245 | 
|  | 1246     - Search for a bookmarked directory and change the working directory to it. | 
|  | 1247     - Add either the dir [directory], if supplied, or otherwise ask for it, | 
|  | 1248       under the title given by either [TITLE], if supplied, or otherwise ask for | 
|  | 1249       it, to the CtrlPBookmarkDir list. | 
|  | 1250     - Add either the dir [directory], if supplied, or otherwise the current | 
|  | 1251       work dir ( [CWD] ) under the title given by either [TITLE], if supplied, | 
|  | 1252       or otherwise [CWD] to the CtrlPBookmarkDir list. | 
|  | 1253 | 
|  | 1254     The last command can be used to add all recently used work dirs to the | 
|  | 1255     CtrlPBookmarkDir list by an autocommand like | 
|  | 1256 | 
|  | 1257     > | 
|  | 1258     augroup CtrlPDirMRU | 
|  | 1259       autocmd! | 
|  | 1260       autocmd FileType * if &modifiable | execute 'silent CtrlPBookmarkDirAdd! %:p:h' | endif | 
|  | 1261     augroup END | 
|  | 1262 < | 
|  | 1263 | 
|  | 1264     - Mappings: | 
|  | 1265       + <cr> change the local working directory for CtrlP, keep it open and | 
|  | 1266         switch to find file mode. | 
|  | 1267       + <c-x> change the global working directory (exit). | 
|  | 1268       + <c-v> change the local working directory for the current window (exit). | 
|  | 1269       + <F7> | 
|  | 1270         - Wipe bookmark list. | 
|  | 1271         - Delete entries marked by <c-z>. | 
|  | 1272 | 
|  | 1273                                                  *ctrlp-autoignore-extension* | 
|  | 1274   * Autoignore mode:~ | 
|  | 1275     - Name: 'autoignore' | 
|  | 1276 | 
|  | 1277     - This extension doesn't add new commands. It adds support for per-project | 
|  | 1278       ignore patterns (as per |ctrlp_custom_ignore|) via a `.ctrlpignore` file | 
|  | 1279       at the root of the project. It's basically like a `.gitignore` or | 
|  | 1280       `.hgignore` for CtrlP. | 
|  | 1281 | 
|  | 1282       Note: auto-ignore won't work when |g:ctrlp_user_command| is used. | 
|  | 1283 | 
|  | 1284       Note: `.ctrlpignore` will be added to the root markers (see | 
|  | 1285       |g:ctrlp_root_markers|). | 
|  | 1286 | 
|  | 1287     - Ignore file syntax: | 
|  | 1288       Empty lines, and lines starting with `#` (comments) are ignored. | 
|  | 1289 | 
|  | 1290       Other lines are treated like regular expression patterns. See *string-match* | 
|  | 1291       for how patterns are used. Anything that matches any of the patterns will be | 
|  | 1292       ignored from CtrlP's search results. | 
|  | 1293 | 
|  | 1294       Example: | 
|  | 1295 | 
|  | 1296         \.tmp$ | 
|  | 1297         ^generated/ | 
|  | 1298         local\.cfg | 
|  | 1299 | 
|  | 1300       Note: patterns should use forward slashes, even on Windows. | 
|  | 1301 | 
|  | 1302       You can also switch to a glob-like syntax like this: | 
|  | 1303 | 
|  | 1304         syntax:wildignore | 
|  | 1305         *.tar.gz | 
|  | 1306         *.tmp | 
|  | 1307 | 
|  | 1308       This will temporarily add each pattern to |'wildignore'| for the | 
|  | 1309       duration of the file scan, and remove them at the end. | 
|  | 1310 | 
|  | 1311       You can switch back to the default regular-expression-based patterns by | 
|  | 1312       writing: | 
|  | 1313 | 
|  | 1314         syntax:regexp | 
|  | 1315 | 
|  | 1316       You can also specify a match on only a given type of item: | 
|  | 1317 | 
|  | 1318         dir:build | 
|  | 1319         file:foo\.txt | 
|  | 1320 | 
|  | 1321       This will only ignore directories with "build" in them, and files with | 
|  | 1322       "foo.txt" in them. Not files with "build" in them or vice-versa. | 
|  | 1323 | 
|  | 1324       Note: to ignore a root directory "build", and not _any_ directory with | 
|  | 1325       "build" in it, you can root the regex: ^build$ | 
|  | 1326 | 
|  | 1327     - FAQ: | 
|  | 1328       Q: Why can't CtrlP support `.gitignore` or `.hgignore` natively? | 
|  | 1329 | 
|  | 1330       A: Those files look at first like they may contain all the patterns | 
|  | 1331       you'd want to exclude from CtrlP already. However, more often than not, | 
|  | 1332       there are some differences. Those files list patterns that should not be | 
|  | 1333       included in source-control. This includes things you want to ignore, but | 
|  | 1334       also things you may not want to: local settings, external packages and | 
|  | 1335       dependencies, etc. The author felt the trouble of supporting various | 
|  | 1336       syntaxes was too much compared to just copy/pasting a few lines. Feel | 
|  | 1337       free to contribute a patch if you disagree :) | 
|  | 1338 | 
|  | 1339       Q: I enabled |ctrlp-autoignore-extension|, or edited `.ctrlpignore`, but | 
|  | 1340       none of the new patterns are working. What did I do wrong? | 
|  | 1341 | 
|  | 1342       A: Probably nothing! CtrlP can cache search results for faster response | 
|  | 1343       times. You can hit <F5> to force it to refresh. This will use the newer | 
|  | 1344       ignore patterns if the `.ctrlpignore` file has changed, too. | 
|  | 1345 | 
|  | 1346 | 
|  | 1347 ---------------------------------------- | 
|  | 1348 Buffer Tag mode options:~ | 
|  | 1349 | 
|  | 1350                                                    *'g:ctrlp_buftag_ctags_bin'* | 
|  | 1351 If ctags isn't in your $PATH, or a ctags binary exists in either | 
|  | 1352 /opt/local/bin or /usr/local/bin, use this to set its location: > | 
|  | 1353   let g:ctrlp_buftag_ctags_bin = '' | 
|  | 1354 < | 
|  | 1355 | 
|  | 1356                                                    *'g:ctrlp_buftag_systemenc'* | 
|  | 1357 Match this with your OS's encoding (not Vim's). The default value mirrors Vim's | 
|  | 1358 global |'encoding'| option: > | 
|  | 1359   let g:ctrlp_buftag_systemenc = &encoding | 
|  | 1360 < | 
|  | 1361 | 
|  | 1362                                                        *'g:ctrlp_buftag_types'* | 
|  | 1363 Use this to set the arguments for ctags, jsctags... for a given filetype: > | 
|  | 1364   let g:ctrlp_buftag_types = '' | 
|  | 1365 < | 
|  | 1366 Examples: > | 
|  | 1367   let g:ctrlp_buftag_types = { | 
|  | 1368     \ 'erlang'     : '--language-force=erlang --erlang-types=drmf', | 
|  | 1369     \ 'javascript' : { | 
|  | 1370       \ 'bin': 'jsctags', | 
|  | 1371       \ 'args': '-f -', | 
|  | 1372       \ }, | 
|  | 1373     \ } | 
|  | 1374 < | 
|  | 1375 | 
|  | 1376 =============================================================================== | 
|  | 1377 CUSTOMIZATION                                             *ctrlp-customization* | 
|  | 1378 | 
|  | 1379 Highlighting:~ | 
|  | 1380   * For the CtrlP buffer: | 
|  | 1381     CtrlPNoEntries : the message when no match is found (Error) | 
|  | 1382     CtrlPMatch     : the matched pattern (Identifier) | 
|  | 1383     CtrlPLinePre   : the line prefix '>' in the match window | 
|  | 1384     CtrlPPrtBase   : the prompt's base (Comment) | 
|  | 1385     CtrlPPrtText   : the prompt's text (|hl-Normal|) | 
|  | 1386     CtrlPPrtCursor : the prompt's cursor when moving over the text (Constant) | 
|  | 1387 | 
|  | 1388   * Buffer explorer mode: | 
|  | 1389     CtrlPBufferNr     : buffer number | 
|  | 1390     CtrlPBufferInd    : '+', '-', '=' and '#' indicators (see |:buffers|) | 
|  | 1391     CtrlPBufferHid    : hidden buffer | 
|  | 1392     CtrlPBufferHidMod : hidden and modified buffer | 
|  | 1393     CtrlPBufferVis    : visible buffer | 
|  | 1394     CtrlPBufferVisMod : visible and modified buffer | 
|  | 1395     CtrlPBufferCur    : current buffer | 
|  | 1396     CtrlPBufferCurMod : current and modified buffer | 
|  | 1397     CtrlPBufferPath   : buffer path | 
|  | 1398 | 
|  | 1399   * In extensions: | 
|  | 1400     CtrlPTabExtra  : the part of each line that's not matched against (Comment) | 
|  | 1401     CtrlPBufName   : the buffer name an entry belongs to (|hl-Directory|) | 
|  | 1402     CtrlPTagKind   : the kind of the tag in buffer-tag mode (|hl-Title|) | 
|  | 1403     CtrlPqfLineCol : the line and column numbers in quickfix mode (Comment) | 
|  | 1404     CtrlPUndoT     : the elapsed time in undo mode (|hl-Directory|) | 
|  | 1405     CtrlPUndoBr    : the square brackets [] in undo mode (Comment) | 
|  | 1406     CtrlPUndoNr    : the undo number inside [] in undo mode (String) | 
|  | 1407     CtrlPUndoSv    : the point where the file was saved (Comment) | 
|  | 1408     CtrlPUndoPo    : the current position in the undo tree (|hl-Title|) | 
|  | 1409     CtrlPBookmark  : the name of the bookmark (Identifier) | 
|  | 1410 | 
|  | 1411 Statuslines:~ | 
|  | 1412   * Highlight groups: | 
|  | 1413     CtrlPMode1 : 'file' or 'path' or 'line', and the current mode (Character) | 
|  | 1414     CtrlPMode2 : 'prt' or 'win', 'regex', the working directory (|hl-LineNr|) | 
|  | 1415     CtrlPStats : the scanning status (Function) | 
|  | 1416 | 
|  | 1417   For rebuilding the statuslines, see |g:ctrlp_status_func|. | 
|  | 1418 | 
|  | 1419 =============================================================================== | 
|  | 1420 MISCELLANEOUS CONFIGS                             *ctrlp-miscellaneous-configs* | 
|  | 1421 | 
|  | 1422 * Using |wildignore| for |g:ctrlp_user_command|: | 
|  | 1423 > | 
|  | 1424   function! s:wig2cmd() | 
|  | 1425     " Change wildignore into space or | separated groups | 
|  | 1426     " e.g. .aux .out .toc .jpg .bmp .gif | 
|  | 1427     " or   .aux$\|.out$\|.toc$\|.jpg$\|.bmp$\|.gif$ | 
|  | 1428     let pats = ['[*\/]*\([?_.0-9A-Za-z]\+\)\([*\/]*\)\(\\\@<!,\|$\)','\\\@<!,'] | 
|  | 1429     let subs = has('win32') || has('win64') ? ['\1\3', ' '] : ['\1\2\3', '\\|'] | 
|  | 1430     let expr = substitute(&wig, pats[0], subs[0], 'g') | 
|  | 1431     let expr = substitute(expr, pats[1], subs[1], 'g') | 
|  | 1432     let expr = substitute(expr, '\\,', ',', 'g') | 
|  | 1433 | 
|  | 1434     " Set the user_command option | 
|  | 1435     let g:ctrlp_user_command = has('win32') || has('win64') | 
|  | 1436       \ ? 'dir %s /-n /b /s /a-d | findstr /V /l "'.expr.'"' | 
|  | 1437       \ : 'find %s -type f | grep -v "'.expr .'"' | 
|  | 1438   endfunction | 
|  | 1439 | 
|  | 1440   call s:wig2cmd() | 
|  | 1441 < | 
|  | 1442 (submitted by Rich Alesi <github.com/ralesi>) | 
|  | 1443 | 
|  | 1444 * A standalone function to set the working directory to the project's root, or | 
|  | 1445   to the parent directory of the current file if a root can't be found: | 
|  | 1446 > | 
|  | 1447   function! s:setcwd() | 
|  | 1448     let cph = expand('%:p:h', 1) | 
|  | 1449     if cph =~ '^.\+://' | retu | en | 
|  | 1450     for mkr in ['.git/', '.hg/', '.svn/', '.bzr/', '_darcs/', '.vimprojects'] | 
|  | 1451       let wd = call('find'.(mkr =~ '/$' ? 'dir' : 'file'), [mkr, cph.';']) | 
|  | 1452       if wd != '' | let &acd = 0 | brea | en | 
|  | 1453     endfo | 
|  | 1454     exe 'lc!' fnameescape(wd == '' ? cph : substitute(wd, mkr.'$', '.', '')) | 
|  | 1455   endfunction | 
|  | 1456 | 
|  | 1457   autocmd BufEnter * call s:setcwd() | 
|  | 1458 < | 
|  | 1459 (requires Vim 7.1.299+) | 
|  | 1460 | 
|  | 1461 * Using a |count| to invoke different commands using the same mapping: | 
|  | 1462 > | 
|  | 1463   let g:ctrlp_cmd = 'exe "CtrlP".get(["", "Buffer", "MRU"], v:count)' | 
|  | 1464 < | 
|  | 1465 | 
|  | 1466 =============================================================================== | 
|  | 1467 CREDITS                                                         *ctrlp-credits* | 
|  | 1468 | 
|  | 1469 Originally developed by Kien Nguyen <github.com/kien>.  Now maintained by the | 
|  | 1470 members of the ctrlpvim Github organisation | 
|  | 1471 (https://github.com/orgs/ctrlpvim/people).  Distributed under Vim's |license|. | 
|  | 1472 | 
|  | 1473 Project's homepage:   http://ctrlpvim.github.com/ctrlp.vim | 
|  | 1474 Git repository:       https://github.com/ctrlpvim/ctrlp.vim | 
|  | 1475 | 
|  | 1476 ------------------------------------------------------------------------------- | 
|  | 1477 Thanks to everyone that has submitted ideas, bug reports or helped debugging on | 
|  | 1478 gibhub, bitbucket, and through email. | 
|  | 1479 | 
|  | 1480 Special thanks:~ | 
|  | 1481 | 
|  | 1482     * Woojong Koh <github.com/wjkoh> | 
|  | 1483     * Simon Ruderich | 
|  | 1484     * Yasuhiro Matsumoto <github.com/mattn> | 
|  | 1485     * Ken Earley <github.com/kenearley> | 
|  | 1486     * Kyo Nagashima <github.com/hail2u> | 
|  | 1487     * Zak Johnson <github.com/zakj> | 
|  | 1488     * Diego Viola <github.com/diegoviola> | 
|  | 1489     * Piet Delport <github.com/pjdelport> | 
|  | 1490     * Thibault Duplessis <github.com/ornicar> | 
|  | 1491     * Kent Sibilev <github.com/datanoise> | 
|  | 1492     * Tacahiroy <github.com/tacahiroy> | 
|  | 1493     * Luca Pette <github.com/lucapette> | 
|  | 1494     * Seth Fowler <github.com/sfowler> | 
|  | 1495     * Lowe Thiderman <github.com/thiderman> | 
|  | 1496     * Christopher Fredén <github.com/icetan> | 
|  | 1497     * Zahary Karadjov <github.com/zah> | 
|  | 1498     * Jo De Boeck <github.com/grimpy> | 
|  | 1499     * Rudi Grinberg <github.com/rgrinberg> | 
|  | 1500     * Timothy Mellor <github.com/mellort> | 
|  | 1501     * Sergey Vlasov <github.com/noscript> | 
|  | 1502 | 
|  | 1503 =============================================================================== | 
|  | 1504 CHANGELOG                                                     *ctrlp-changelog* | 
|  | 1505 | 
|  | 1506     * New option |g:ctrlp_custom_tag_files| to specify custom tag files. | 
|  | 1507     * Accept 0 for g:ctrlp_match_window no-limited window size. | 
|  | 1508 | 
|  | 1509 Before 2016/11/28~ | 
|  | 1510 | 
|  | 1511     + New command: |YankLine()| to yank current line. | 
|  | 1512     + New option: |g:ctrlp_types| to select builtin modes. | 
|  | 1513     + New feature: asynchronized spawn of |g:ctrlp_user_command|. This enable | 
|  | 1514                   with set |g:ctrlp_user_command_async| to 1. | 
|  | 1515     + Support buffertag for delphi, rust and golang. | 
|  | 1516     + New option: |g:ctrlp_brief_prompt|, | 
|  | 1517                   |g:match_current_file|, | 
|  | 1518                   |g:ctrlp_compare_lim|. | 
|  | 1519     + New feature: Auto-ignore extension. | 
|  | 1520     + Support buffertag for ant, tex, dosbatch, matlab and vhdl. | 
|  | 1521     + New option |g:ctrlp_line_prefix| for integrating third party plugins. | 
|  | 1522     + New option |g:open_single_match| to open single file in matches. | 
|  | 1523     + Add <plug>(ctrlp) for launch CtrlP. | 
|  | 1524     + Accept bang for CtrlPBookmarkDirAdd to avoid confirm. | 
|  | 1525     + Handle variable like "g:ctrlp_TYPE_MODE". | 
|  | 1526                    ex: let g:ctrlp_path_sort | 
|  | 1527     + New option: |g:ctrlp_custom_ancestors| | 
|  | 1528 | 
|  | 1529 Before 2014/08/08~ | 
|  | 1530 | 
|  | 1531     + New buffer explorer mode with highlighting (|+conceal| recommended) | 
|  | 1532     + New options: |g:ctrlp_bufname_mod|, | 
|  | 1533                    |g:ctrlp_bufpath_mod| | 
|  | 1534     + Combine *g:ctrlp_match_window_bottom* *g:ctrlp_match_window_reversed* and | 
|  | 1535       *g:ctrlp_max_height* into |g:ctrlp_match_window|. | 
|  | 1536     + New option: |g:ctrlp_match_window|. | 
|  | 1537 | 
|  | 1538 Before 2012/11/30~ | 
|  | 1539 | 
|  | 1540     + New options: |g:ctrlp_abbrev|, | 
|  | 1541                    |g:ctrlp_key_loop|, | 
|  | 1542                    |g:ctrlp_open_func|, | 
|  | 1543                    |g:ctrlp_tabpage_position|, | 
|  | 1544                    |g:ctrlp_mruf_save_on_update| | 
|  | 1545     + Rename: | 
|  | 1546         *g:ctrlp_dotfiles* -> |g:ctrlp_show_hidden|. | 
|  | 1547     + Change |g:ctrlp_switch_buffer|'s and |g:ctrlp_working_path_mode|'s type | 
|  | 1548       (old values still work). | 
|  | 1549     + New key for |g:ctrlp_user_command| when it's a Dictionary: 'ignore'. | 
|  | 1550 | 
|  | 1551 Before 2012/06/15~ | 
|  | 1552 | 
|  | 1553     + New value for |g:ctrlp_follow_symlinks|: 2. | 
|  | 1554     + New value for |g:ctrlp_open_multiple_files|: 'j'. | 
|  | 1555     + Allow using <c-t>, <c-x>, <c-v> to open files marked by <c-z>. | 
|  | 1556     + Extend '..' (|ctrlp-input-formats| (d)) | 
|  | 1557     + New input format: '@cd' (|ctrlp-input-formats| (d)) | 
|  | 1558 | 
|  | 1559 Before 2012/04/30~ | 
|  | 1560 | 
|  | 1561     + New option: |g:ctrlp_mruf_default_order| | 
|  | 1562     + New feature: Bookmarked directories extension. | 
|  | 1563     + New commands: |:CtrlPBookmarkDir| | 
|  | 1564                     |:CtrlPBookmarkDirAdd| | 
|  | 1565 | 
|  | 1566 Before 2012/04/15~ | 
|  | 1567 | 
|  | 1568     + New option: |g:ctrlp_buffer_func|, callback functions for CtrlP buffer. | 
|  | 1569     + Remove: g:ctrlp_mruf_last_entered, make it a default for MRU mode. | 
|  | 1570     + New commands: |:CtrlPLastMode|, open CtrlP in the last mode used. | 
|  | 1571                     |:CtrlPMixed|, search in files, buffers and MRU files. | 
|  | 1572 | 
|  | 1573 Before 2012/03/31~ | 
|  | 1574 | 
|  | 1575     + New options: |g:ctrlp_default_input|, default input when entering CtrlP. | 
|  | 1576                    |g:ctrlp_match_func|, allow using a custom fuzzy matcher. | 
|  | 1577     + Rename: | 
|  | 1578         *ClearCtrlPCache* -> |CtrlPClearCache| | 
|  | 1579         *ClearAllCtrlPCaches* -> |CtrlPClearAllCaches| | 
|  | 1580         *ResetCtrlP* -> |CtrlPReload| | 
|  | 1581 | 
|  | 1582 Before 2012/03/02~ | 
|  | 1583 | 
|  | 1584     + Rename: | 
|  | 1585         *g:ctrlp_regexp_search* -> |g:ctrlp_regexp|, | 
|  | 1586         *g:ctrlp_dont_split* -> |g:ctrlp_reuse_window|, | 
|  | 1587         *g:ctrlp_jump_to_buffer* -> |g:ctrlp_switch_buffer|. | 
|  | 1588     + Rename and tweak: | 
|  | 1589         *g:ctrlp_open_multi* -> |g:ctrlp_open_multiple_files|. | 
|  | 1590     + Deprecate *g:ctrlp_highlight_match* | 
|  | 1591     + Extend |g:ctrlp_user_command| to support multiple commands. | 
|  | 1592     + New option: |g:ctrlp_mruf_last_entered| change MRU to Recently-Entered. | 
|  | 1593 | 
|  | 1594 Before 2012/01/15~ | 
|  | 1595 | 
|  | 1596     + New mapping: Switch <tab> and <s-tab>. <tab> is now used for completion | 
|  | 1597                    of directory names under the current working directory. | 
|  | 1598     + New options: |g:ctrlp_arg_map| for <c-y>, <c-o> to accept an argument. | 
|  | 1599                    |g:ctrlp_status_func| custom statusline. | 
|  | 1600                    |g:ctrlp_mruf_relative| show only MRU files inside cwd. | 
|  | 1601     + Extend g:ctrlp_open_multi with new optional values: tr, hr, vr. | 
|  | 1602     + Extend |g:ctrlp_custom_ignore| to specifically filter dir, file and link. | 
|  | 1603 | 
|  | 1604 Before 2012/01/05~ | 
|  | 1605 | 
|  | 1606     + New feature: Buffer Tag extension. | 
|  | 1607     + New commands: |:CtrlPBufTag|, |:CtrlPBufTagAll|. | 
|  | 1608     + New options: |g:ctrlp_cmd|, | 
|  | 1609                    |g:ctrlp_custom_ignore| | 
|  | 1610 | 
|  | 1611 Before 2011/11/30~ | 
|  | 1612 | 
|  | 1613     + New features: Tag, Quickfix and Directory extensions. | 
|  | 1614     + New commands: |:CtrlPTag|, |:CtrlPQuickfix|, |:CtrlPDir|. | 
|  | 1615     + New options: |g:ctrlp_use_migemo|, | 
|  | 1616                    |g:ctrlp_lazy_update|, | 
|  | 1617                    |g:ctrlp_follow_symlinks| | 
|  | 1618 | 
|  | 1619 Before 2011/11/13~ | 
|  | 1620 | 
|  | 1621     + New special input: '/' and '\' find root (|ctrlp-input-formats| (e)) | 
|  | 1622     + Remove ctrlp#SetWorkingPath(). | 
|  | 1623     + Remove *g:ctrlp_mru_files* and make MRU mode permanent. | 
|  | 1624     + Extend g:ctrlp_open_multi, add new ways to open files. | 
|  | 1625     + New option: g:ctrlp_dont_split, | 
|  | 1626                   |g:ctrlp_mruf_case_sensitive| | 
|  | 1627 | 
|  | 1628 Before 2011/10/30~ | 
|  | 1629 | 
|  | 1630     + New feature: Support for custom extensions. | 
|  | 1631                    <F5> also removes non-existent files from MRU list. | 
|  | 1632     + New option: g:ctrlp_jump_to_buffer | 
|  | 1633 | 
|  | 1634 Before 2011/10/12~ | 
|  | 1635 | 
|  | 1636     + New features: Open multiple files. | 
|  | 1637                     Pass Vim's |++opt| and |+cmd| to the opening file | 
|  | 1638                     (|ctrlp-input-formats| (c)) | 
|  | 1639                     Auto-complete each dir for |:CtrlP| [starting-directory] | 
|  | 1640     + New mappings: <c-z> mark/unmark a file to be opened with <c-o>. | 
|  | 1641                     <c-o> open all marked files. | 
|  | 1642     + New option: g:ctrlp_open_multi | 
|  | 1643     + Remove *g:ctrlp_persistent_input* *g:ctrlp_live_update* and <c-^>. | 
|  | 1644 | 
|  | 1645 Before 2011/09/29~ | 
|  | 1646 | 
|  | 1647     + New mappings: <c-n>, <c-p> next/prev string in the input history. | 
|  | 1648                     <c-y> create a new file and its parent dirs. | 
|  | 1649     + New options: |g:ctrlp_open_new_file|, | 
|  | 1650                    |g:ctrlp_max_history| | 
|  | 1651     + Added a new open-in-horizontal-split mapping: <c-x> | 
|  | 1652 | 
|  | 1653 Before 2011/09/19~ | 
|  | 1654 | 
|  | 1655     + New command: ResetCtrlP | 
|  | 1656     + New options: |g:ctrlp_max_files|, | 
|  | 1657                    |g:ctrlp_max_depth|, | 
|  | 1658                    g:ctrlp_live_update | 
|  | 1659     + New mapping: <c-^> | 
|  | 1660 | 
|  | 1661 Before 2011/09/12~ | 
|  | 1662 | 
|  | 1663     + Ability to cycle through matched lines in the match window. | 
|  | 1664     + Extend the behavior of g:ctrlp_persistent_input | 
|  | 1665     + Extend the behavior of |:CtrlP| | 
|  | 1666     + New options: |g:ctrlp_dotfiles|, | 
|  | 1667                    |g:ctrlp_clear_cache_on_exit|, | 
|  | 1668                    g:ctrlp_highlight_match, | 
|  | 1669                    |g:ctrlp_user_command| | 
|  | 1670     + New special input: '..' (|ctrlp-input-formats| (d)) | 
|  | 1671     + New mapping: <F5>. | 
|  | 1672     + New commands: |:CtrlPCurWD|, | 
|  | 1673                     |:CtrlPCurFile|, | 
|  | 1674                     |:CtrlPRoot| | 
|  | 1675 | 
|  | 1676     + New feature: Search in most recently used (MRU) files | 
|  | 1677     + New mapping: <c-b>. | 
|  | 1678     + Extended the behavior of <c-f>. | 
|  | 1679     + New options: g:ctrlp_mru_files, | 
|  | 1680                    |g:ctrlp_mruf_max|, | 
|  | 1681                    |g:ctrlp_mruf_exclude|, | 
|  | 1682                    |g:ctrlp_mruf_include| | 
|  | 1683     + New command: |:CtrlPMRU| | 
|  | 1684 | 
|  | 1685 First public release: 2011/09/06~ | 
|  | 1686 | 
|  | 1687 =============================================================================== | 
|  | 1688 vim:ft=help:et:ts=2:sw=2:sts=2:norl |