annotate vim/vimfiles/doc/ctrlp.txt @ 0:48859d9c82c5

Initial commit, based on settings used at work (minus NERD tree & some tagging plugins).
author Brian Neal <bgneal@gmail.com>
date Tue, 03 Jan 2012 20:53:13 -0600
parents
children 92af3257a261
rev   line source
bgneal@0 1 *ctrlp.txt* Fuzzy file, buffer, mru and tag finder. v1.6.4
bgneal@0 2 *CtrlP* *ControlP* *'ctrlp'* *'ctrl-p'*
bgneal@0 3 ===============================================================================
bgneal@0 4 # #
bgneal@0 5 # :::::::: ::::::::::: ::::::::: ::: ::::::::: #
bgneal@0 6 # :+: :+: :+: :+: :+: :+: :+: :+: #
bgneal@0 7 # +:+ +:+ +:+ +:+ +:+ +:+ +:+ #
bgneal@0 8 # +#+ +#+ +#++:++#: +#+ +#++:++#+ #
bgneal@0 9 # +#+ +#+ +#+ +#+ +#+ +#+ #
bgneal@0 10 # #+# #+# #+# #+# #+# #+# #+# #
bgneal@0 11 # ######## ### ### ### ########## ### #
bgneal@0 12 # #
bgneal@0 13 ===============================================================================
bgneal@0 14 CONTENTS *ctrlp-contents*
bgneal@0 15
bgneal@0 16 1. Intro........................................|ctrlp-intro|
bgneal@0 17 2. Options......................................|ctrlp-options|
bgneal@0 18 3. Commands.....................................|ctrlp-commands|
bgneal@0 19 4. Mappings.....................................|ctrlp-mappings|
bgneal@0 20 5. Input Formats................................|ctrlp-input-formats|
bgneal@0 21 6. Extensions...................................|ctrlp-extensions|
bgneal@0 22
bgneal@0 23 ===============================================================================
bgneal@0 24 1. Intro *ctrlp-intro*
bgneal@0 25
bgneal@0 26 Full path fuzzy file, buffer and MRU file finder with an intuitive interface.
bgneal@0 27 Written in pure Vimscript for MacVim and Vim version 7.0+. Has full support for
bgneal@0 28 Vim’s |regexp| as search pattern, built-in MRU monitoring, project’s root
bgneal@0 29 finder, and more.
bgneal@0 30
bgneal@0 31 To enable optional extensions (tag, quickfix, dir...), see |ctrlp-extensions|.
bgneal@0 32
bgneal@0 33 ===============================================================================
bgneal@0 34 2. Options *ctrlp-options*
bgneal@0 35
bgneal@0 36 Below are the available options and their default values:~
bgneal@0 37
bgneal@0 38 *'g:ctrlp_map'*
bgneal@0 39 Use this option to change the mapping to invoke |CtrlP| in |Normal| mode: >
bgneal@0 40 let g:ctrlp_map = '<c-p>'
bgneal@0 41 <
bgneal@0 42
bgneal@0 43 *'g:loaded_ctrlp'*
bgneal@0 44 Use this option to disable the plugin completely: >
bgneal@0 45 let g:loaded_ctrlp = 1
bgneal@0 46 <
bgneal@0 47
bgneal@0 48 *'g:ctrlp_by_filename'*
bgneal@0 49 Set this to 1 to set search by filename (not full path) as the default: >
bgneal@0 50 let g:ctrlp_by_filename = 0
bgneal@0 51 <
bgneal@0 52
bgneal@0 53 *'g:ctrlp_regexp_search'*
bgneal@0 54 Set this to 1 to set |regexp| search as the default: >
bgneal@0 55 let g:ctrlp_regexp_search = 0
bgneal@0 56 <
bgneal@0 57
bgneal@0 58 *'g:ctrlp_match_window_bottom'*
bgneal@0 59 Set this to 0 to show the match window at the top of the screen: >
bgneal@0 60 let g:ctrlp_match_window_bottom = 1
bgneal@0 61 <
bgneal@0 62
bgneal@0 63 *'g:ctrlp_match_window_reversed'*
bgneal@0 64 Reverse the sort order of the matched files in the match window. The default
bgneal@0 65 setting is from bottom to top: >
bgneal@0 66 let g:ctrlp_match_window_reversed = 1
bgneal@0 67 <
bgneal@0 68
bgneal@0 69 *'g:ctrlp_max_height'*
bgneal@0 70 Set the maximum height of the match window: >
bgneal@0 71 let g:ctrlp_max_height = 10
bgneal@0 72 <
bgneal@0 73
bgneal@0 74 *'g:ctrlp_jump_to_buffer'*
bgneal@0 75 Set this to 0 to disable the jump-to-open-buffer feature. Set to 2 to also jump
bgneal@0 76 tab if the selected buffer’s opened in another tab: >
bgneal@0 77 let g:ctrlp_jump_to_buffer = 1
bgneal@0 78 <
bgneal@0 79
bgneal@0 80 *'g:ctrlp_working_path_mode'*
bgneal@0 81 When starting up the prompt, temporarily set the working directory (i.e. the
bgneal@0 82 |current-directory|) to:
bgneal@0 83 1 - the parent directory of the current file.
bgneal@0 84 2 - the nearest ancestor that contains one of these directories/files:
bgneal@0 85 .git/
bgneal@0 86 .hg/
bgneal@0 87 .bzr/
bgneal@0 88 _darcs/
bgneal@0 89 root.dir
bgneal@0 90 .vimprojects
bgneal@0 91 0 - don’t manage working directory.
bgneal@0 92 >
bgneal@0 93 let g:ctrlp_working_path_mode = 2
bgneal@0 94 <
bgneal@0 95
bgneal@0 96 *'g:ctrlp_root_markers'*
bgneal@0 97 Use this to set your own root markers in addition to the default ones. Your
bgneal@0 98 markers will take precedence: >
bgneal@0 99 let g:ctrlp_root_markers = ['']
bgneal@0 100 <
bgneal@0 101 These markers (builtins and yours) will serve as identifiers for the '/' and
bgneal@0 102 '\' special inputs (section 5.e)
bgneal@0 103
bgneal@0 104 *'g:ctrlp_use_caching'*
bgneal@0 105 Set this to 0 to disable per-session caching. When disabled, caching will still
bgneal@0 106 be enabled for directories that have more than 4000 files: >
bgneal@0 107 let g:ctrlp_use_caching = 1
bgneal@0 108 <
bgneal@0 109 Note: you can quickly purge the cache by pressing <F5> while inside |CtrlP|.
bgneal@0 110
bgneal@0 111 *'g:ctrlp_clear_cache_on_exit'*
bgneal@0 112 Set this to 0 to enable cross-sessions caching: >
bgneal@0 113 let g:ctrlp_clear_cache_on_exit = 1
bgneal@0 114 <
bgneal@0 115
bgneal@0 116 *'g:ctrlp_cache_dir'*
bgneal@0 117 Set the directory to store the cache files: >
bgneal@0 118 let g:ctrlp_cache_dir = $HOME.'/.ctrlp_cache'
bgneal@0 119 <
bgneal@0 120
bgneal@0 121 *'g:ctrlp_prompt_mappings'*
bgneal@0 122 Use this to customize the mappings inside |CtrlP|’s prompt to your liking. You
bgneal@0 123 only need to keep the lines that you’ve changed the values (inside []): >
bgneal@0 124 let g:ctrlp_prompt_mappings = {
bgneal@0 125 \ 'PrtBS()': ['<bs>'],
bgneal@0 126 \ 'PrtDelete()': ['<del>'],
bgneal@0 127 \ 'PrtDeleteWord()': ['<c-w>'],
bgneal@0 128 \ 'PrtClear()': ['<c-u>'],
bgneal@0 129 \ 'PrtSelectMove("j")': ['<c-j>', '<down>'],
bgneal@0 130 \ 'PrtSelectMove("k")': ['<c-k>', '<up>'],
bgneal@0 131 \ 'PrtHistory(-1)': ['<c-n>'],
bgneal@0 132 \ 'PrtHistory(1)': ['<c-p>'],
bgneal@0 133 \ 'AcceptSelection("e")': ['<cr>', '<2-LeftMouse>'],
bgneal@0 134 \ 'AcceptSelection("h")': ['<c-x>', '<c-cr>', '<c-s>'],
bgneal@0 135 \ 'AcceptSelection("t")': ['<c-t>', '<MiddleMouse>'],
bgneal@0 136 \ 'AcceptSelection("v")': ['<c-v>', '<c-q>', '<RightMouse>'],
bgneal@0 137 \ 'ToggleFocus()': ['<tab>'],
bgneal@0 138 \ 'ToggleRegex()': ['<c-r>'],
bgneal@0 139 \ 'ToggleByFname()': ['<c-d>'],
bgneal@0 140 \ 'ToggleType(1)': ['<c-f>', '<c-up'],
bgneal@0 141 \ 'ToggleType(-1)': ['<c-b>', '<c-down>'],
bgneal@0 142 \ 'PrtCurStart()': ['<c-a>'],
bgneal@0 143 \ 'PrtCurEnd()': ['<c-e>'],
bgneal@0 144 \ 'PrtCurLeft()': ['<c-h>', '<left>'],
bgneal@0 145 \ 'PrtCurRight()': ['<c-l>', '<right>'],
bgneal@0 146 \ 'PrtClearCache()': ['<F5>'],
bgneal@0 147 \ 'PrtDeleteMRU()': ['<F7>'],
bgneal@0 148 \ 'CreateNewFile()': ['<c-y>'],
bgneal@0 149 \ 'MarkToOpen()': ['<c-z>'],
bgneal@0 150 \ 'OpenMulti()': ['<c-o>'],
bgneal@0 151 \ 'PrtExit()': ['<esc>', '<c-c>', '<c-g>'],
bgneal@0 152 \ }
bgneal@0 153 <
bgneal@0 154 If you have problem with <bs> moving left instead of deleting a char, add this
bgneal@0 155 to your |vimrc|: >
bgneal@0 156 let g:ctrlp_prompt_mappings = {
bgneal@0 157 \ 'PrtBS()': ['<c-h>'],
bgneal@0 158 \ 'PrtCurLeft()': ['<left>'],
bgneal@0 159 \ }
bgneal@0 160 <
bgneal@0 161
bgneal@0 162 *'g:ctrlp_mruf_max'*
bgneal@0 163 Specify the number of recently opened files you want |CtrlP| to remember: >
bgneal@0 164 let g:ctrlp_mruf_max = 250
bgneal@0 165 <
bgneal@0 166
bgneal@0 167 *'g:ctrlp_mruf_exclude'*
bgneal@0 168 Files you don’t want |CtrlP| to remember; use |regexp| to specify the patterns:
bgneal@0 169 >
bgneal@0 170 let g:ctrlp_mruf_exclude = ''
bgneal@0 171 <
bgneal@0 172 Examples: >
bgneal@0 173 let g:ctrlp_mruf_exclude = '/tmp/.*\|/temp/.*' " MacOSX/Linux
bgneal@0 174 let g:ctrlp_mruf_exclude = '^C:\\dev\\tmp\\.*' " Windows
bgneal@0 175 <
bgneal@0 176
bgneal@0 177 *'g:ctrlp_mruf_include'*
bgneal@0 178 And if you want |CtrlP| to only remember some files, specify them here: >
bgneal@0 179 let g:ctrlp_mruf_include = ''
bgneal@0 180 <
bgneal@0 181 Example: >
bgneal@0 182 let g:ctrlp_mruf_include = '\.py$\|\.rb$'
bgneal@0 183 <
bgneal@0 184
bgneal@0 185 *'g:ctrlp_mruf_case_sensitive'*
bgneal@0 186 Match this with your file system case-sensitivity setting to avoid duplicate
bgneal@0 187 MRU entries: >
bgneal@0 188 let g:ctrlp_mruf_case_sensitive = 1
bgneal@0 189 <
bgneal@0 190
bgneal@0 191 *'g:ctrlp_dotfiles'*
bgneal@0 192 Set this to 0 if you don’t want |CtrlP| to search for dotfiles and dotdirs: >
bgneal@0 193 let g:ctrlp_dotfiles = 1
bgneal@0 194 <
bgneal@0 195 You can also use |'wildignore'| to exclude anything from the search.
bgneal@0 196 e.g. exclude version control directories from the results: >
bgneal@0 197 set wildignore+=*/.git/*,*/.hg/*,*/.svn/* " Linux/MacOSX
bgneal@0 198 set wildignore+=.git\*,.hg\*,.svn\* " Windows
bgneal@0 199 <
bgneal@0 200 Note: the `*/` in front of each dotfile glob is required for the dotfiles
bgneal@0 201 search feature to work correctly along side with |wildignore|. If you’ve
bgneal@0 202 disabled dotfiles search (set |g:ctrlp_dotfiles| to 0), then you can ignore
bgneal@0 203 this.
bgneal@0 204
bgneal@0 205 Other note: |wildignore| influences the result of |expand()|, |globpath()| and
bgneal@0 206 |glob()| which many plugins use to find stuff on the system (e.g. fugitive.vim
bgneal@0 207 looks for .git/, some other plugins look for external exe tools on Windows).
bgneal@0 208 So be a little mindful of what you put in your |wildignore|.
bgneal@0 209
bgneal@0 210 *'g:ctrlp_highlight_match'*
bgneal@0 211 Use this to enable/disable highlighting of the matched patterns and to specify
bgneal@0 212 the highlight group that’ll be used: >
bgneal@0 213 let g:ctrlp_highlight_match = [1, 'Identifier']
bgneal@0 214 <
bgneal@0 215
bgneal@0 216 *'g:ctrlp_max_files'*
bgneal@0 217 The maximum number of files to scan, set to 0 for no limit: >
bgneal@0 218 let g:ctrlp_max_files = 20000
bgneal@0 219 <
bgneal@0 220
bgneal@0 221 *'g:ctrlp_max_depth'*
bgneal@0 222 The maximum depth of a directory tree to recurse into: >
bgneal@0 223 let g:ctrlp_max_depth = 40
bgneal@0 224 <
bgneal@0 225 Note: the larger these values, the more memory Vim uses.
bgneal@0 226
bgneal@0 227 *'g:ctrlp_user_command'*
bgneal@0 228 Specify an external tool to use for listing files instead of Vim’s globpath().
bgneal@0 229 Use %s in place of the target directory: >
bgneal@0 230 let g:ctrlp_user_command = ''
bgneal@0 231 <
bgneal@0 232 Examples: >
bgneal@0 233 let g:ctrlp_user_command = 'find %s -type f' " MacOSX/Linux
bgneal@0 234 let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d' " Windows
bgneal@0 235 <
bgneal@0 236 You can also use 'grep', 'findstr' or something else to filter the results.
bgneal@0 237 Examples: >
bgneal@0 238 let g:ctrlp_user_command = 'find %s -type f | grep (?!tmp/.*)'
bgneal@0 239 let g:ctrlp_user_command = 'dir %s /-n /b /s /a-d | findstr .*\.py$'
bgneal@0 240 <
bgneal@0 241 Use a version control listing command when inside a repository, this is a lot
bgneal@0 242 faster when working with large projects: >
bgneal@0 243 let g:ctrlp_user_command = [repo_marker, vcs_ls_command, fallback_command]
bgneal@0 244 <
bgneal@0 245 If the fallback_command is empty or not defined, globpath() will then be used
bgneal@0 246 when searching outside a repo.
bgneal@0 247 Examples: >
bgneal@0 248 let g:ctrlp_user_command = ['.git/', 'cd %s && git ls-files']
bgneal@0 249 let g:ctrlp_user_command = ['.hg/', 'hg --cwd %s locate --fullpath -I .']
bgneal@0 250 <
bgneal@0 251
bgneal@0 252 *'g:ctrlp_open_new_file'*
bgneal@0 253 Use this option to specify how the newly created file is to be opened when
bgneal@0 254 pressing <c-y>:
bgneal@0 255 1 - in a new tab
bgneal@0 256 2 - in a new horizontal split
bgneal@0 257 3 - in a new vertical split
bgneal@0 258 0 - in the current window
bgneal@0 259 >
bgneal@0 260 let g:ctrlp_open_new_file = 3
bgneal@0 261 <
bgneal@0 262
bgneal@0 263 *'g:ctrlp_max_history'*
bgneal@0 264 The maximum number of input strings you want |CtrlP| to remember. The default
bgneal@0 265 value mirrors Vim’s global |'history'| option: >
bgneal@0 266 let g:ctrlp_max_history = &history
bgneal@0 267 <
bgneal@0 268 Set to 0 to disable prompt’s history.
bgneal@0 269
bgneal@0 270 *'g:ctrlp_open_multi'*
bgneal@0 271 If non-zero, this will enable opening multiple files with <c-z> and <c-o>: >
bgneal@0 272 let g:ctrlp_open_multi = '1v'
bgneal@0 273 <
bgneal@0 274 For the number:
bgneal@0 275 If bigger than 1, it’ll be used as the maximum number of windows or tabs to
bgneal@0 276 create when opening the files (the rest will be hidden buffers). If is 1,
bgneal@0 277 <c-o> will open all files, each in a new window or new tab.
bgneal@0 278 For the letter:
bgneal@0 279 t - each in a tab
bgneal@0 280 h - each in a horizontal split
bgneal@0 281 v - each in a vertical split
bgneal@0 282
bgneal@0 283 *'g:ctrlp_dont_split'*
bgneal@0 284 When opening a file with <cr>, |CtrlP| avoids opening it in windows created by
bgneal@0 285 plugins, help and quickfix. Use this to setup some exceptions: >
bgneal@0 286 let g:ctrlp_dont_split = ''
bgneal@0 287 <
bgneal@0 288 Acceptable values are partial names or filetypes of the special buffers. Use
bgneal@0 289 |regexp| to specify the pattern. Example: >
bgneal@0 290 let g:ctrlp_dont_split = 'netrw\|help'
bgneal@0 291 <
bgneal@0 292
bgneal@0 293 *'g:ctrlp_follow_symlinks'*
bgneal@0 294 Set this to 1 to follow symbolic links when listing files: >
bgneal@0 295 let g:ctrlp_follow_symlinks = 0
bgneal@0 296 <
bgneal@0 297
bgneal@0 298 *'g:ctrlp_lazy_update'*
bgneal@0 299 Set this to 1 to enable the lazy-update feature: only update the match window
bgneal@0 300 after typing’s been stopped for a certain amount of time: >
bgneal@0 301 let g:ctrlp_lazy_update = 0
bgneal@0 302 <
bgneal@0 303 If is 1, update after 250ms. If bigger than 1, the number will be used as the
bgneal@0 304 delay time in milliseconds.
bgneal@0 305
bgneal@0 306 *'g:ctrlp_use_migemo'*
bgneal@0 307 Set this to 1 to use Migemo Pattern for Japanese filenames. Migemo Search only
bgneal@0 308 works in |regexp| mode. To split the pattern, separate words with space: >
bgneal@0 309 let g:ctrlp_use_migemo = 0
bgneal@0 310 <
bgneal@0 311
bgneal@0 312 ===============================================================================
bgneal@0 313 3. Commands *ctrlp-commands*
bgneal@0 314
bgneal@0 315 *:CtrlP*
bgneal@0 316 :CtrlP [starting-directory]
bgneal@0 317 Open |CtrlP| in find file mode.
bgneal@0 318
bgneal@0 319 If no argument is given, the value of |g:ctrlp_working_path_mode| will be
bgneal@0 320 used to determine the starting directory.
bgneal@0 321 You can use <tab> to auto-complete the [starting-directory] when typing it.
bgneal@0 322
bgneal@0 323 *:CtrlPBuffer*
bgneal@0 324 :CtrlPBuffer
bgneal@0 325 Open |CtrlP| in find buffer mode.
bgneal@0 326
bgneal@0 327 *:CtrlPMRU*
bgneal@0 328 :CtrlPMRU
bgneal@0 329 Open |CtrlP| in find Most-Recently-Used file mode.
bgneal@0 330
bgneal@0 331 *:ClearCtrlPCache*
bgneal@0 332 :ClearCtrlPCache
bgneal@0 333 Flush the cache for the current working directory. The same as pressing <F5>
bgneal@0 334 inside |CtrlP|.
bgneal@0 335
bgneal@0 336 *:ClearAllCtrlPCaches*
bgneal@0 337 :ClearAllCtrlPCaches
bgneal@0 338 Delete all the cache files saved in |ctrlp_cache_dir|.
bgneal@0 339
bgneal@0 340 *:ResetCtrlP*
bgneal@0 341 :ResetCtrlP
bgneal@0 342 Reset all options, take in new values of the option variables in section 2.
bgneal@0 343
bgneal@0 344 -------------------------------------------------------------------------------
bgneal@0 345 The following commands ignore the current value of |g:ctrlp_working_path_mode|:
bgneal@0 346
bgneal@0 347 :CtrlPCurWD *:CtrlPCurWD*
bgneal@0 348 This acts like |:CtrlP| with |path_mode| = 0
bgneal@0 349
bgneal@0 350 :CtrlPCurFile *:CtrlPCurFile*
bgneal@0 351 This acts like |:CtrlP| with |path_mode| = 1
bgneal@0 352
bgneal@0 353 :CtrlPRoot *:CtrlPRoot*
bgneal@0 354 This acts like |:CtrlP| with |path_mode| = 2
bgneal@0 355
bgneal@0 356 ===============================================================================
bgneal@0 357 4. Mappings *ctrlp-mappings*
bgneal@0 358
bgneal@0 359 *'ctrlp-<c-p>'*
bgneal@0 360 <c-p>
bgneal@0 361 Default |Normal| mode mapping to open the |CtrlP| prompt in find file mode.
bgneal@0 362
bgneal@0 363 Once inside the prompt:~
bgneal@0 364
bgneal@0 365 <c-r> *'ctrlp-fullregexp'*
bgneal@0 366 Toggle between the string mode (section 5.a & b) and full |regexp| mode.
bgneal@0 367 (note: in full |regexp| mode, the prompt’s base is 'r>>' instead of '>>>')
bgneal@0 368
bgneal@0 369 See also |input-formats| and |g:ctrlp_regexp_search|.
bgneal@0 370
bgneal@0 371 <c-d>
bgneal@0 372 Toggle between full path search and filename only search.
bgneal@0 373 (note: in filename mode, the prompt’s base is '>d>' instead of '>>>')
bgneal@0 374
bgneal@0 375 <c-f>, 'forward'
bgneal@0 376 <c-up>
bgneal@0 377 Scroll to the 'next' search mode in the sequence.
bgneal@0 378
bgneal@0 379 <c-b>, 'backward'
bgneal@0 380 <c-down>
bgneal@0 381 Scroll to the 'previous' search mode in the sequence.
bgneal@0 382
bgneal@0 383 <tab>
bgneal@0 384 Toggle the focus between the match window and the prompt.
bgneal@0 385
bgneal@0 386 <c-j>,
bgneal@0 387 <down>
bgneal@0 388 Move selection down
bgneal@0 389
bgneal@0 390 <c-k>,
bgneal@0 391 <up>
bgneal@0 392 Move selection up
bgneal@0 393
bgneal@0 394 <c-a>
bgneal@0 395 Move the cursor to the 'start' of the prompt
bgneal@0 396
bgneal@0 397 <c-e>
bgneal@0 398 Move the cursor to the 'end' of the prompt
bgneal@0 399
bgneal@0 400 <c-h>,
bgneal@0 401 <left>
bgneal@0 402 Move the cursor one character to the 'left'
bgneal@0 403
bgneal@0 404 <c-l>,
bgneal@0 405 <right>
bgneal@0 406 Move the cursor one character to the 'right'
bgneal@0 407
bgneal@0 408 <c-w>
bgneal@0 409 Delete a preceding inner word
bgneal@0 410
bgneal@0 411 <c-u>
bgneal@0 412 Clear the input field
bgneal@0 413
bgneal@0 414 <cr>
bgneal@0 415 Open selected file in the active window if possible.
bgneal@0 416
bgneal@0 417 <c-t>
bgneal@0 418 Open selected file in a new 'tab'
bgneal@0 419
bgneal@0 420 <c-v>
bgneal@0 421 Open selected file in a 'vertical' split
bgneal@0 422
bgneal@0 423 <c-cr>,
bgneal@0 424 <c-s>,
bgneal@0 425 <c-x>
bgneal@0 426 Open selected file in a 'horizontal' split
bgneal@0 427
bgneal@0 428 <c-y>
bgneal@0 429 Create a new file and its parent directories.
bgneal@0 430
bgneal@0 431 <c-n>
bgneal@0 432 Next string in the prompt’s history
bgneal@0 433
bgneal@0 434 <c-p>
bgneal@0 435 Previous string in the prompt’s history
bgneal@0 436
bgneal@0 437 <c-z>
bgneal@0 438 Mark/unmark a file to be opened with <c-o>.
bgneal@0 439
bgneal@0 440 <c-o>
bgneal@0 441 Open files marked by <c-z>.
bgneal@0 442
bgneal@0 443 <F5>
bgneal@0 444 - Refresh the match window and purge the cache for the current directory.
bgneal@0 445 - Remove deleted files from MRU list.
bgneal@0 446
bgneal@0 447 <F7>
bgneal@0 448 Clear MRU list.
bgneal@0 449
bgneal@0 450 <esc>,
bgneal@0 451 <c-c>,
bgneal@0 452 <c-g>
bgneal@0 453 Exit |CtrlP|. <c-c> can also be used to stop the file scan.
bgneal@0 454
bgneal@0 455 Choose your own mappings with |g:ctrlp_prompt_mappings|.
bgneal@0 456
bgneal@0 457 When inside the match window (press <tab> to switch):~
bgneal@0 458
bgneal@0 459 a-z
bgneal@0 460 0-9
bgneal@0 461 ~^-=;`',.+!@#$%&_(){}[]
bgneal@0 462 Cycle through the lines with the first letter (of paths or filenames) that
bgneal@0 463 matches that key.
bgneal@0 464
bgneal@0 465 ===============================================================================
bgneal@0 466 5. Input Formats *ctrlp-input-formats*
bgneal@0 467
bgneal@0 468 Formats for inputting in the prompt:~
bgneal@0 469
bgneal@0 470 a) Simple string.
bgneal@0 471 e.g. 'abc' is understood internally as 'a[^a]\{-}b[^b]\{-}c'
bgneal@0 472
bgneal@0 473 b) Vim |regexp|. If the input string contains '*' or '|', it’ll be treated as
bgneal@0 474 a Vim’s |regexp| |pattern| without any modification.
bgneal@0 475 e.g. 'abc\d*efg' will be read as 'abc\d*efg'.
bgneal@0 476
bgneal@0 477 See also |ctrlp-fullregexp| (key map) and |g:ctrlp_regexp_search| (option).
bgneal@0 478
bgneal@0 479 c) End the string with a colon ':' followed by a Vim command to execute that
bgneal@0 480 command after opening the file. If you need to use ':' in the command,
bgneal@0 481 escape it with a backslash: '\:'.
bgneal@0 482 e.g. 'abc:45' will open the selected file and jump to line 45.
bgneal@0 483 'abc:/my\:function' will open the selected file and jump to the first
bgneal@0 484 instance of 'my:function'.
bgneal@0 485 'abc:+setf\ myfiletype|50' will open the selected file and set its
bgneal@0 486 filetype to 'myfiletype' then jump to line 50.
bgneal@0 487
bgneal@0 488 See also Vim’s |++opt| and |+cmd|.
bgneal@0 489
bgneal@0 490 d) Type exactly two dots '..' at the start of the prompt and press enter to go
bgneal@0 491 backward in the directory tree by 1 level. If the parent directory is
bgneal@0 492 large, this might be slow.
bgneal@0 493
bgneal@0 494 e) Similarly submit '/' or '\' to find and go to the project’s root. If the
bgneal@0 495 project is large, using a VCS listing command to look for files might help
bgneal@0 496 speeding up the intial scan (see |g:ctrlp_user_command| for more details).
bgneal@0 497
bgneal@0 498 f) Type the name of a non-existent file and press <c-y> to create it.
bgneal@0 499 e.g. 'parentdir/file.txt' will create a directory named 'parentdir' as well
bgneal@0 500 as 'file.txt'.
bgneal@0 501 Use '\' in place of '/' on Windows (if |'ssl'| is not set).
bgneal@0 502
bgneal@0 503 g) Submit ? to open this help file.
bgneal@0 504
bgneal@0 505 ===============================================================================
bgneal@0 506 6. Extensions *g:ctrlp-extensions*
bgneal@0 507
bgneal@0 508 Extensions are optional. To enable an extension, add its name to the variable
bgneal@0 509 g:ctrlp_extensions: >
bgneal@0 510 let g:ctrlp_extensions = ['tag', 'quickfix', 'dir']
bgneal@0 511 <
bgneal@0 512 The order of the items will be the order they appear on the statusline and when
bgneal@0 513 using <c-f>, <c-b>.
bgneal@0 514
bgneal@0 515 Available extensions:~
bgneal@0 516
bgneal@0 517 *:CtrlPTag*
bgneal@0 518 * Tag mode:~
bgneal@0 519 - Name: 'tag'
bgneal@0 520 - Command: ':CtrlPTag'
bgneal@0 521 - Search for a tag within a generated central tags file, and jump to the
bgneal@0 522 definition. Use the Vim’s option |'tags'| to specify the names and the
bgneal@0 523 locations of the tags file(s). Example: `set tags+=tags/help,doc/tags`
bgneal@0 524
bgneal@0 525 *:CtrlPQuickfix*
bgneal@0 526 * Quickfix mode:~
bgneal@0 527 - Name: 'quickfix'
bgneal@0 528 - Command: ':CtrlPQuickfix'
bgneal@0 529 - Search for an entry in the current quickfix errors and jump to it.
bgneal@0 530
bgneal@0 531 *:CtrlPDir*
bgneal@0 532 * Directory mode:~
bgneal@0 533 - Name: 'dir'
bgneal@0 534 - Command: ':CtrlPDir'
bgneal@0 535 - Search for a directory and change the working directory to it.
bgneal@0 536 - Mappings:
bgneal@0 537 + <cr> change the local working directory for |CtrlP| and keep it open.
bgneal@0 538 + <c-t> change the global working directory (exit).
bgneal@0 539 + <c-v> change the local working directory for the current window (exit).
bgneal@0 540 + <c-x> change the global working directory to |CtrlP|’s current local
bgneal@0 541 working directory (exit).
bgneal@0 542
bgneal@0 543 ===============================================================================
bgneal@0 544 EXTENDING *ctrlp-extending*
bgneal@0 545
bgneal@0 546 Extending |CtrlP| is very simple. Simply create a vim file following a short
bgneal@0 547 guidelines, place it in autoload/ctrlp/ and add its name to your .vimrc.
bgneal@0 548
bgneal@0 549 To see how it works, get the sample.vim from the extensions branch on the main
bgneal@0 550 git repository (https://github.com/kien/ctrlp.vim/tree/extensions), and place
bgneal@0 551 it along with the parent directories somewhere in your runtimepath. Then put
bgneal@0 552 this into your .vimrc: >
bgneal@0 553 let g:ctrlp_extensions = ['sample']
bgneal@0 554 <
bgneal@0 555 A new search type will show up the next time you open |CtrlP|.
bgneal@0 556
bgneal@0 557 For more details, check out the comments inside sample.vim.~
bgneal@0 558
bgneal@0 559 ===============================================================================
bgneal@0 560 CREDITS *ctrlp-credits*
bgneal@0 561
bgneal@0 562 Developed by Kien Nguyen <github.com/kien>, initially based on the Command-T
bgneal@0 563 and the LustyExplorer plugins. No code was taken from these plugins, but I did
bgneal@0 564 clone the majority of their (awesome) interfaces and the way they work.
bgneal@0 565
bgneal@0 566 This was originally written as a module for a would-be larger plugin called
bgneal@0 567 AutoDoc.vim which I’ve stopped developing because of lost of interest. I really
bgneal@0 568 liked the way Command-T and LustyExplorer deal with user’s input, so I wrote a
bgneal@0 569 pure Vimscript version of their prompt window, intended to use it for the
bgneal@0 570 aforementioned plugin.
bgneal@0 571
bgneal@0 572 Homepage: http://kien.github.com/ctrlp.vim
bgneal@0 573 Git repository: https://github.com/kien/ctrlp.vim
bgneal@0 574 Mercurial repository: https://bitbucket.org/kien/ctrlp.vim
bgneal@0 575
bgneal@0 576 ===============================================================================
bgneal@0 577 THANKS *ctrlp-thanks*
bgneal@0 578
bgneal@0 579 Thanks to everyone that has submitted ideas, bug reports or helped debugging on
bgneal@0 580 gibhub, bitbucket, and through email.
bgneal@0 581
bgneal@0 582 Special thanks:~
bgneal@0 583
bgneal@0 584 * Woojong Koh <github.com/wjkoh>
bgneal@0 585 Forked and suggested the support for VCS listing commands.
bgneal@0 586
bgneal@0 587 * Yasuhiro Matsumoto <github.com/mattn>
bgneal@0 588 Added option to use Migemo for Japanese language.
bgneal@0 589
bgneal@0 590 ===============================================================================
bgneal@0 591 CHANGELOG *ctrlp-changelog*
bgneal@0 592
bgneal@0 593 Before 2011/11/30~
bgneal@0 594
bgneal@0 595 + New features: Tag, Quickfix and Directory extensions.
bgneal@0 596 + New commands: |:CtrlPTag|, |:CtrlPQuickfix|, |:CtrlPDir|.
bgneal@0 597 + New options: |g:ctrlp_use_migemo|,
bgneal@0 598 |g:ctrlp_lazy_update|,
bgneal@0 599 |g:ctrlp_follow_symlinks|
bgneal@0 600
bgneal@0 601 Before 2011/11/13~
bgneal@0 602
bgneal@0 603 + New special input: '/' and '\' find root (section 5.e)
bgneal@0 604 + Remove ctrlp#SetWorkingPath().
bgneal@0 605 + Remove |g:ctrlp_mru_files|, make MRU permanent.
bgneal@0 606 + Extend |g:ctrlp_open_multi|, add new ways to open files.
bgneal@0 607 + New option: |g:ctrlp_dont_split|,
bgneal@0 608 |g:ctrlp_mruf_case_sensitive|
bgneal@0 609
bgneal@0 610 Before 2011/10/30~
bgneal@0 611
bgneal@0 612 + New feature: Support for custom extensions.
bgneal@0 613 <F5> also removes non-existent files from MRU list.
bgneal@0 614 + New option: |g:ctrlp_jump_to_buffer|
bgneal@0 615
bgneal@0 616 Before 2011/10/12~
bgneal@0 617
bgneal@0 618 + New features: Open multiple files.
bgneal@0 619 Pass Vim’s |++opt| and |+cmd| to the opening file
bgneal@0 620 (section 5.c)
bgneal@0 621 Auto-complete each dir for |:CtrlP| [starting-directory]
bgneal@0 622 + New mappings: <c-z> mark/unmark a file to be opened with <c-o>.
bgneal@0 623 <c-o> open all marked files.
bgneal@0 624 + New option: |g:ctrlp_open_multi|
bgneal@0 625 + Remove |g:ctrlp_persistent_input|, |g:ctrlp_live_update| and <c-^>.
bgneal@0 626
bgneal@0 627 Before 2011/09/29~
bgneal@0 628
bgneal@0 629 + New mappings: <c-n>, <c-p> next/prev string in the input history.
bgneal@0 630 <c-y> create a new file and its parent dirs.
bgneal@0 631 + New options: |g:ctrlp_open_new_file|,
bgneal@0 632 |g:ctrlp_max_history|
bgneal@0 633 + Added a new open-in-horizontal-split mapping: <c-x>
bgneal@0 634
bgneal@0 635 Before 2011/09/19~
bgneal@0 636
bgneal@0 637 + New command: |ResetCtrlP|
bgneal@0 638 + New options: |g:ctrlp_max_files|,
bgneal@0 639 |g:ctrlp_max_depth|,
bgneal@0 640 |g:ctrlp_live_update|
bgneal@0 641 + New mapping: <c-^>
bgneal@0 642
bgneal@0 643 Before 2011/09/12~
bgneal@0 644
bgneal@0 645 + Ability to cycle through matched lines in the match window.
bgneal@0 646 + Extend the behavior of |g:ctrlp_persistent_input|
bgneal@0 647 + Extend the behavior of |:CtrlP|
bgneal@0 648 + New options: |g:ctrlp_dotfiles|,
bgneal@0 649 |g:ctrlp_clear_cache_on_exit|,
bgneal@0 650 |g:ctrlp_highlight_match|,
bgneal@0 651 |g:ctrlp_user_command|
bgneal@0 652 + New special input: '..' (section 5.d)
bgneal@0 653 + New mapping: <F5>.
bgneal@0 654 + New commands: |:CtrlPCurWD|,
bgneal@0 655 |:CtrlPCurFile|,
bgneal@0 656 |:CtrlPRoot|
bgneal@0 657
bgneal@0 658 + New feature: Search in most recently used (MRU) files
bgneal@0 659 + New mapping: <c-b>.
bgneal@0 660 + Extended the behavior of <c-f>.
bgneal@0 661 + New options: |g:ctrlp_mru_files|,
bgneal@0 662 |g:ctrlp_mruf_max|,
bgneal@0 663 |g:ctrlp_mruf_exclude|,
bgneal@0 664 |g:ctrlp_mruf_include|
bgneal@0 665 + New command: |:CtrlPMRUFiles|
bgneal@0 666
bgneal@0 667 First public release: 2011/09/06~
bgneal@0 668
bgneal@0 669 ===============================================================================
bgneal@0 670 vim:ft=help:et:ts=2:sw=2:sts=2:norl