Commits

kien  committed c391ddc

v1.7.7

Paste from registers
Extend '..' input
Use @cd like :cd
Separate filename and path
Some miscellaneous additions

  • Participants
  • Parent commits 76210f8

Comments (0)

Files changed (3)

File autoload/ctrlp.vim

 " File:          autoload/ctrlp.vim
 " Description:   Fuzzy file, buffer, mru and tag finder.
 " Author:        Kien Nguyen <github.com/kien>
-" Version:       1.7.6
+" Version:       1.7.7
 " =============================================================================
 
 " ** Static variables {{{1
 		\ '_build$',
 		\ ]
 	let igfiles = [
-		\ '[.]bak$',
 		\ '\~$',
 		\ '#.+#$',
 		\ '[._].*\.swp$',
 		\ 'core\.\d+$',
+		\ '\.exe$',
+		\ '\.so$',
+		\ '\.bak$',
+		\ '\.png$',
+		\ '\.jpg$',
+		\ '\.gif$',
+		\ '\.zip$',
+		\ '\.rar$',
+		\ '\.tar\.gz$',
 		\ ]
 	retu {
 		\ 'dir': '\v'.join(igdirs, '|'),
 	\ 'arg_map':               ['s:argmap', 0],
 	\ 'buffer_func':           ['s:buffunc', {}],
 	\ 'by_filename':           ['s:byfname', 0],
-	\ 'clear_cache_on_exit':   ['s:clrex', 1],
 	\ 'custom_ignore':         ['s:usrign', s:ignore()],
 	\ 'default_input':         ['s:deftxt', 0],
 	\ 'dont_split':            ['s:nosplit', 'netrw'],
 endf
 " * Clear caches {{{1
 fu! ctrlp#clr(...)
-	let g:ctrlp_new{ a:0 ? a:1 : 'cache' } = 1
+	let [s:matches, g:ctrlp_new{ a:0 ? a:1 : 'cache' }] = [1, 1]
 endf
 
 fu! ctrlp#clra()
 endf
 
 fu! s:UserCmd(lscmd)
-	let path = s:dyncwd
+	let [path, lscmd] = [s:dyncwd, a:lscmd]
 	if exists('+ssl') && &ssl
 		let [ssl, &ssl, path] = [&ssl, 0, tr(path, '/', '\')]
 	en
+	if has('win32') || has('win64')
+		let lscmd = substitute(lscmd, '\v(^|&&\s*)\zscd (/d)@!', 'cd /d ', '')
+	en
 	let path = exists('*shellescape') ? shellescape(path) : path
-	let g:ctrlp_allfiles = split(system(printf(a:lscmd, path)), "\n")
+	let g:ctrlp_allfiles = split(system(printf(lscmd, path)), "\n")
 	if exists('+ssl') && exists('ssl')
 		let &ssl = ssl
 		cal map(g:ctrlp_allfiles, 'tr(v:val, "\\", "/")')
 " * MatchedItems() {{{1
 fu! s:MatchIt(items, pat, limit, exc)
 	let [lines, id] = [[], 0]
+	let pat = s:byfname ? split(a:pat, '^[^;]\+\zs;', 1) : a:pat
 	for item in a:items
 		let id += 1
-		try | if !( s:ispath && item == a:exc ) && call(s:mfunc, [item, a:pat]) >= 0
+		try | if !( s:ispath && item == a:exc ) && call(s:mfunc, [item, pat]) >= 0
 			cal add(lines, item)
 		en | cat | brea | endt
 		if a:limit > 0 && len(lines) >= a:limit | brea | en
 	if exists('lst')
 		let pat = ''
 		if !empty(lst)
-			let pat = lst[0]
-			for item in range(1, len(lst) - 1)
-				let pat .= '[^'.lst[item - 1].']\{-}'.lst[item]
-			endfo
+			if s:byfname && index(lst, ';') > 0
+				let fbar = index(lst, ';')
+				let lst_1 = s:sublist(lst, 0, fbar - 1)
+				let lst_2 = len(lst) - 1 > fbar ? s:sublist(lst, fbar + 1, -1) : ['']
+				let pat = s:buildpat(lst_1).';'.s:buildpat(lst_2)
+			el
+				let pat = s:buildpat(lst)
+			en
 		en
 	en
 	retu escape(pat, '~')
 " * BuildPrompt() {{{1
 fu! s:Render(lines, pat)
 	let [&ma, lines, s:height] = [1, a:lines, min([len(a:lines), s:winh])]
+	let pat = s:byfname ? split(a:pat, '^[^;]\+\zs;', 1)[0] : a:pat
 	" Setup the match window
 	sil! exe '%d _ | res' s:height
 	" Print the new items
 	let s:matched = copy(lines)
 	" Sorting
 	if !s:nosort()
-		let s:compat = a:pat
+		let s:compat = pat
 		cal sort(lines, 's:mixedsort')
 		unl s:compat
 	en
 	en
 	" Highlighting
 	if s:dohighlight()
-		cal s:highlight(a:pat, s:mathi[1])
+		cal s:highlight(pat, s:mathi[1])
 	en
 endf
 
 		let type = s:insertstr()
 		if type == 'cancel' | retu | en
 	en
+	if type ==# 'r'
+		let regcont = s:getregs()
+		if regcont < 0 | retu | en
+	en
 	unl! s:hstgot
 	let s:act_add = 1
-	let s:prompt[0] .= type == 'w' ? s:crword
-		\ : type == 's' ? getreg('/')
-		\ : type == 'v' ? s:crvisual
-		\ : type == 'c' ? substitute(getreg('+'), '\n', '\\n', 'g')
-		\ : type == 'f' ? s:crgfile : s:prompt[0]
+	let s:prompt[0] .= type ==# 'w' ? s:crword
+		\ : type ==# 'f' ? s:crgfile
+		\ : type ==# 's' ? s:regisfilter('/')
+		\ : type ==# 'v' ? s:crvisual
+		\ : type ==# 'c' ? s:regisfilter('+')
+		\ : type ==# 'r' ? regcont : ''
 	cal s:BuildPrompt(1)
 	unl s:act_add
 endf
 
 fu! s:PrtExpandDir()
-	let prt = s:prompt
-	if prt[0] == '' | retu | en
+	let str = s:prompt[0]
+	if str =~ '\v^\@(cd|lc[hd]?|chd)\s.+' && s:spi
+		let hasat = split(str, '\v^\@(cd|lc[hd]?|chd)\s*\zs')
+		let str = get(hasat, 1, '')
+	en
+	if str == '' | retu | en
 	unl! s:hstgot
 	let s:act_add = 1
-	let [base, seed] = s:headntail(prt[0])
+	let [base, seed] = s:headntail(str)
 	let dirs = s:dircompl(base, seed)
 	if len(dirs) == 1
-		let prt[0] = dirs[0]
+		let str = dirs[0]
 	elsei len(dirs) > 1
-		let prt[0] .= s:findcommon(dirs, prt[0])
+		let str .= s:findcommon(dirs, str)
 	en
+	let s:prompt[0] = exists('hasat') ? hasat[0].str : str
 	cal s:BuildPrompt(1)
 	unl s:act_add
 endf
 endf
 
 fu! s:SpecInputs(str)
-	let spi = !s:itemtype || s:getextvar('specinput') > 0
-	if a:str == '..' && spi
-		cal s:parentdir(s:dyncwd)
-		cal ctrlp#setlines()
+	if a:str =~ '^\.\.\.*$' && s:spi
+		let cwd = s:dyncwd
+		cal ctrlp#setdir('../'.repeat('../', strlen(a:str) - 2))
+		if cwd != s:dyncwd | cal ctrlp#setlines() | en
 		cal s:PrtClear()
 		retu 1
-	elsei a:str == s:lash && spi
+	elsei a:str == s:lash && s:spi
 		cal s:SetWD(2, 0)
 		cal ctrlp#setlines()
 		cal s:PrtClear()
 		retu 1
+	elsei a:str =~ '^@.\+' && s:spi
+		retu s:at(a:str)
 	elsei a:str == '?'
 		cal s:PrtExit()
 		let hlpwin = &columns > 159 ? '| vert res 80' : ''
 	if a:mode == 'e' | if s:SpecInputs(str) | retu | en | en
 	" Get the selected line
 	let line = !empty(s:lines) ? s:lines[line('.') - 1] : ''
-	if a:mode != 'e' && s:itemtype < 3 && line == ''
-		\ && str !~ '\v^(\.\.|/|\\|\?)$'
+	if a:mode != 'e' && !s:itemtype && line == ''
+		\ && str !~ '\v^(\.\.\.*|/|\\|\?|\@.+)$'
 		cal s:CreateNewFile(a:mode) | retu
 	en
 	if empty(line) | retu | en
 	retu a:items
 endf
 
-fu! s:parentdir(curr)
-	let parent = s:getparent(a:curr)
-	if parent != a:curr | cal ctrlp#setdir(parent) | en
-endf
-
 fu! s:getparent(item)
 	let parent = substitute(a:item, '[\/][^\/]\+[\/:]\?$', '', '')
 	if parent == '' || match(parent, '[\/]') < 0
 	if !empty(a:pat) && s:ispath
 		let pat = s:regexp ? substitute(a:pat, '\\\@<!\^', '^> \\zs', 'g') : a:pat
 		if s:byfname
-			" Match only filename
 			let pat = substitute(pat, '\[\^\(.\{-}\)\]\\{-}', '[^\\/\1]\\{-}', 'g')
 			let pat = substitute(pat, '\$\@<!$', '\\ze[^\\/]*$', 'g')
 		en
 
 fu! s:leavepre()
 	if exists('s:bufnr') && s:bufnr == bufnr('%') | bw! | en
-	if s:clrex && !( has('clientserver') && len(split(serverlist(), "\n")) > 1 )
+	if !( exists('g:ctrlp_clear_cache_on_exit') && !g:ctrlp_clear_cache_on_exit )
+		\ && !( has('clientserver') && len(split(serverlist(), "\n")) > 1 )
 		cal ctrlp#clra()
 	en
 endf
 	retu ermsg =~ '^E11:'
 endf
 " Arguments {{{2
+fu! s:at(str)
+	if a:str =~ '\v^\@(cd|lc[hd]?|chd).*'
+		let str = substitute(a:str, '\v^\@(cd|lc[hd]?|chd)\s*', '', '')
+		if str == '' | retu 1 | en
+		let str = str =~ '^%:.\+' ? fnamemodify(s:crfile, str[1:]) : str
+		let path = fnamemodify(expand(str, 1), ':p')
+		if isdirectory(path)
+			if path != s:dyncwd
+				cal ctrlp#setdir(path)
+				cal ctrlp#setlines()
+			en
+			cal ctrlp#recordhist()
+			cal s:PrtClear()
+		en
+		retu 1
+	en
+	retu 0
+endf
+
 fu! s:tail()
 	if exists('s:optail') && !empty('s:optail')
 		let tailpref = match(s:optail, '^\s*+') < 0 ? ' +' : ' '
 endf
 
 fu! s:sanstail(str)
-	let [str, pat] = [substitute(a:str, '\\\\', '\', 'g'), '\([^:]\|\\:\)*$']
+	let str = s:spi ? substitute(a:str, '^\(@.*$\|\\\\\ze@\)', '', 'g') : a:str
+	let [str, pat] = [substitute(str, '\\\\', '\', 'g'), '\([^:]\|\\:\)*$']
 	unl! s:optail
 	if match(str, '\\\@<!:'.pat) >= 0
 		let s:optail = matchstr(str, '\\\@<!:\zs'.pat)
 endf
 
 fu! s:insertstr()
-	let str = 'Insert: c[w]ord/c[f]ile/[s]earch/[v]isual/[c]lipboard? '
-	retu s:choices(str, ['w', 'f', 's', 'v', 'c'], 's:insertstr', [])
+	let str = 'Insert: c[w]ord/c[f]ile/[s]earch/[v]isual/[c]lipboard/[r]egister? '
+	retu s:choices(str, ['w', 'f', 's', 'v', 'c', 'r'], 's:insertstr', [])
+endf
+
+fu! s:textdialog(str)
+	redr | echoh MoreMsg | echon a:str | echoh None
+	retu nr2char(getchar())
 endf
 
 fu! s:choices(str, choices, func, args)
-	redr
-	echoh MoreMsg
-	echon a:str
-	echoh None
-	let char = nr2char(getchar())
+	let char = s:textdialog(a:str)
 	if index(a:choices, char) >= 0
 		retu char
 	elsei char =~# "\\v\<Esc>|\<C-c>|\<C-g>|\<C-u>|\<C-w>|\<C-[>"
 	en
 	retu call(a:func, a:args)
 endf
+
+fu! s:getregs()
+	let char = s:textdialog('Insert from register: ')
+	if char =~# "\\v\<Esc>|\<C-c>|\<C-g>|\<C-u>|\<C-w>|\<C-[>"
+		cal s:BuildPrompt(0)
+		retu -1
+	elsei char =~# "\<CR>"
+		retu s:getregs()
+	en
+	retu s:regisfilter(char)
+endf
+
+fu! s:regisfilter(reg)
+	retu substitute(getreg(a:reg), "[\t\n]", ' ', 'g')
+endf
 " Misc {{{2
 fu! s:modevar()
 	let s:matchtype = s:mtype()
 	let s:mfunc = s:mfunc()
 	let s:nolim = s:getextvar('nolim')
 	let s:dosort = s:getextvar('sort')
+	let s:spi = !s:itemtype || s:getextvar('specinput') > 0
 endf
 
 fu! s:nosort()
 	let [ovreg, ovtype] = [getreg('v'), getregtype('v')]
 	let [oureg, outype] = [getreg('"'), getregtype('"')]
 	sil! norm! gv"vy
-	let selected = substitute(getreg('v'), '\n', '\\n', 'g')
+	let selected = s:regisfilter('v')
 	cal setreg('v', ovreg, ovtype)
 	cal setreg('"', oureg, outype)
 	cal winrestview(cview)
 endf
 " Matching {{{2
 fu! s:matchfname(item, pat)
-	retu match(split(a:item, s:lash)[-1], a:pat)
+	let parts = split(a:item, '[\/]\ze[^\/]\+$')
+	let mfn = match(parts[-1], a:pat[0])
+	retu len(a:pat) == 1 ? mfn : len(a:pat) == 2 ?
+		\ ( mfn >= 0 && ( len(parts) == 2 ? match(parts[0], a:pat[1]) : -1 ) >= 0
+		\ ? 0 : -1 ) : -1
+	en
 endf
 
 fu! s:matchtabs(item, pat)
 	retu match(split(a:item, '\t\+[^\t]\+$')[0], a:pat)
 endf
 
+fu! s:buildpat(lst)
+	let pat = a:lst[0]
+	for item in range(1, len(a:lst) - 1)
+		let pat .= '[^'.a:lst[item - 1].']\{-}'.a:lst[item]
+	endfo
+	retu pat
+endf
+
 fu! s:mfunc()
 	let mfunc = 'match'
 	if s:byfname && s:ispath

File autoload/ctrlp/bookmarkdir.vim

 endf
 
 fu! s:savebookmark(name, cwd)
-	let entries = filter(s:getbookmarks(), 's:parts(v:val)[1] != a:cwd')
+	let cwds = exists('+ssl') ? [tr(a:cwd, '\', '/'), tr(a:cwd, '/', '\')] : [a:cwd]
+	let entries = filter(s:getbookmarks(), 'index(cwds, s:parts(v:val)[1]) < 0')
 	cal s:writecache(insert(entries, a:name.'	'.a:cwd))
 endf
 

File doc/ctrlp.txt

-*ctrlp.txt*       Fuzzy file, buffer, mru and tag finder. v1.7.6
+*ctrlp.txt*       Fuzzy file, buffer, mru and tag finder. v1.7.7
 *CtrlP* *ControlP* *'ctrlp'* *'ctrl-p'*
 ===============================================================================
 #                                                                             #
 
 Full path fuzzy file, buffer, mru and tag finder with an intuitive interface.
 Written in pure Vimscript for MacVim and Vim version 7.0+. Has full support for
-Vims |regexp| as search pattern, built-in MRU files monitoring, projects root
+Vim's |regexp| as search pattern, built-in MRU files monitoring, project's root
 finder, and more.
 
 To enable optional extensions (tag, dir, rtscript...), see |ctrlp-extensions|.
   |ctrlp_max_height|            Max height of the match window.
   |ctrlp_switch_buffer|         Jump to an open buffer if already opened.
   |ctrlp_reuse_window|          Reuse special windows (help, quickfix, etc).
-  |ctrlp_working_path_mode|     How to set CtrlPs local working directory.
+  |ctrlp_working_path_mode|     How to set CtrlP's local working directory.
   |ctrlp_root_markers|          Additional, high priority root markers.
   |ctrlp_use_caching|           Use per-session caching or not.
   |ctrlp_clear_cache_on_exit|   Keep cache after exiting Vim or not.
 
   MRU mode:
   |ctrlp_mruf_max|              Max MRU entries to remember.
-  |ctrlp_mruf_exclude|          Files that shouldnt be remembered.
+  |ctrlp_mruf_exclude|          Files that shouldn't be remembered.
   |ctrlp_mruf_include|          Files to be remembered.
   |ctrlp_mruf_relative|         Show only MRU files in the working directory.
   |ctrlp_mruf_default_order|    Disable sorting.
   |ctrlp_mruf_case_sensitive|   MRU files are case sensitive or not.
 
   Advanced options:
-  |ctrlp_status_func|           Change CtrlPs two statuslines.
+  |ctrlp_status_func|           Change CtrlP's two statuslines.
   |ctrlp_buffer_func|           Call custom functions in the CtrlP buffer.
   |ctrlp_match_func|            Replace the built-in matching algorithm.
 
 <
 
                                                       *'g:ctrlp_switch_buffer'*
-When opening a file with <cr> or <c-t>, if the files already opened somewhere
+When opening a file with <cr> or <c-t>, if the file's already opened somewhere
 CtrlP will try to jump to it instead of opening a new instance: >
   let g:ctrlp_switch_buffer = 2
 <
-  1 - only jump to the buffer if it’s opened in the current tab.
-  2 - jump tab as well if the buffer’s opened in another tab.
+  1 - only jump to the buffer if it's opened in the current tab.
+  2 - jump tab as well if the buffer's opened in another tab.
   0 - disable this feature.
 
                                                        *'g:ctrlp_reuse_window'*
 variable: >
   let g:ctrlp_working_path_mode = 2
 <
-  1 - the parent directory of the current file.
+  1 - the directory of the current file.
   2 - the nearest ancestor that contains one of these directories or files:
       .git/ .hg/ .svn/ .bzr/ _darcs/
-  0 - dont manage working directory.
+  0 - don't manage working directory.
 Note: you can use b:ctrlp_working_path_mode (a |b:var|) to set this option on a
 per buffer basis.
 
 <
 
                                                            *'g:ctrlp_dotfiles'*
-Set this to 0 if you dont want CtrlP to scan for dotfiles and dotdirs: >
+Set this to 0 if you don't want CtrlP to scan for dotfiles and dotdirs: >
   let g:ctrlp_dotfiles = 1
 <
 You can use |'wildignore'| to exclude anything from the search.
 Note: the larger these values, the more memory Vim uses.
 
                                                        *'g:ctrlp_user_command'*
-Specify an external tool to use for listing files instead of using Vims
+Specify an external tool to use for listing files instead of using Vim's
 |globpath()|. Use %s in place of the target directory: >
   let g:ctrlp_user_command = ''
 <
 
                                                         *'g:ctrlp_max_history'*
 The maximum number of input strings you want CtrlP to remember. The default
-value mirrors Vims global |'history'| option: >
+value mirrors Vim's global |'history'| option: >
   let g:ctrlp_max_history = &history
 <
-Set to 0 to disable prompts history. Browse the history with <c-n> and <c-p>.
+Set to 0 to disable prompt's history. Browse the history with <c-n> and <c-p>.
 
                                                       *'g:ctrlp_open_new_file'*
 Use this option to specify how the newly created file is to be opened when
   let g:ctrlp_open_multiple_files = '2vr'
 <
 For the number:
-  - If given, itll be used as the maximum number of windows or tabs to create
+  - If given, it'll be used as the maximum number of windows or tabs to create
     when opening the files (the rest will be opened as hidden buffers).
   - If not given, <c-o> will open all files, each in a new window or new tab.
 For the letters:
 
                                                         *'g:ctrlp_lazy_update'*
 Set this to 1 to enable the lazy-update feature: only update the match window
-after typings been stopped for a certain amount of time: >
+after typing's been stopped for a certain amount of time: >
   let g:ctrlp_lazy_update = 0
 <
 If is 1, update after 250ms. If bigger than 1, the number will be used as the
 delay time in milliseconds.
 
                                                       *'g:ctrlp_default_input'*
-Set this to 1 to enable seeding the prompt with the current files relative
+Set this to 1 to enable seeding the prompt with the current file's relative
 path: >
   let g:ctrlp_default_input = 0
 <
 <
 
                                                     *'g:ctrlp_prompt_mappings'*
-Use this to customize the mappings inside CtrlP’s prompt to your liking. You
-only need to keep the lines that you’ve changed the values (inside []): >
+Use this to customize the mappings inside CtrlP's prompt to your liking. You
+only need to keep the lines that you've changed the values (inside []): >
   let g:ctrlp_prompt_mappings = {
     \ 'PrtBS()':              ['<bs>', '<c-]>'],
     \ 'PrtDelete()':          ['<del>'],
     \ 'PrtExit()':            ['<esc>', '<c-c>', '<c-g>'],
     \ }
 <
-Note: In some terminals, its not possible to remap <c-h> without also changing
+Note: In some terminals, it's not possible to remap <c-h> without also changing
 <bs> (|keycodes|). So if pressing <bs> moves the cursor to the left instead of
-deleting a char for you, add this to your |.vimrc| to disable the plugins
+deleting a char for you, add this to your |.vimrc| to disable the plugin's
 default <c-h> mapping: >
   let g:ctrlp_prompt_mappings = { 'PrtCurLeft()': ['<left>', '<c-^>'] }
 <
 <
 
                                                        *'g:ctrlp_mruf_exclude'*
-Files you dont want CtrlP to remember. Use regexp to specify the patterns: >
+Files you don't want CtrlP to remember. Use regexp to specify the patterns: >
   let g:ctrlp_mruf_exclude = ''
 <
 Examples: >
 <c-p>
    Default |Normal| mode mapping to open the CtrlP prompt in find file mode.
 
+----------------------------------------
 Once inside the prompt:~
 
   <c-d>
     Toggle between full-path search and filename only search.
-    Note: in filename mode, the prompts base is '>d>' instead of '>>>'
+    Note: in filename mode, the prompt's base is '>d>' instead of '>>>'
 
   <c-r>                                                    *'ctrlp-fullregexp'*
     Toggle between the string mode and full regexp mode.
-    Note: in full regexp mode, the prompts base is 'r>>' instead of '>>>'
+    Note: in full regexp mode, the prompt's base is 'r>>' instead of '>>>'
 
-    See also |input-formats| (guide) and |g:ctrlp_regexp_search| (option).
+    See also: |input-formats| (guide) and |g:ctrlp_regexp_search| (option).
 
   <c-f>, 'forward'
   <c-up>
   <c-down>
     Scroll to the 'previous' search mode in the sequence.
 
-  <tab>
+  <tab>                                                *'ctrlp-autocompletion'*
     Auto-complete directory names under the current working directory inside
     the prompt.
 
   <s-tab>
     Toggle the focus between the match window and the prompt.
 
+  <esc>,
+  <c-c>
+    Exit CtrlP.
+
+Movement:~
+
   <c-j>,
   <down>
     Move selection down.
   <right>
     Move the cursor one character to the 'right'.
 
+Editing:~
+
   <c-]>,
   <bs>
     Delete the preceding character.
   <c-u>
     Clear the input field.
 
+Input history:~
+
+  <c-n>
+    Next string in the prompt's history.
+
+  <c-p>
+    Previous string in the prompt's history.
+
+Open a file:~
+
   <cr>
     Open selected file in the active window if possible.
 
   <c-y>
     Create a new file and its parent directories.
 
-  <c-n>
-    Next string in the prompt’s history.
-
-  <c-p>
-    Previous string in the prompt’s history.
+Open multiple files:~
 
   <c-z>
     - Mark/unmark a file to be opened with <c-o>.
-    - Or mark/unmark a file to create a new file in its directory using <c-y>.
+    - Mark/unmark a file to create a new file in its directory using <c-y>.
 
   <c-o>
     Open files marked by <c-z>.
 
+Function keys:~
+
   <F5>
     - Refresh the match window and purge the cache for the current directory.
-    - Or remove deleted files from the MRU list.
+    - Remove deleted files from the MRU list.
 
   <F7>
     - Wipe the MRU list.
-    - Or delete MRU entries marked by <c-z>.
+    - Delete MRU entries marked by <c-z>.
 
-  <Insert>,
+Pasting:~
+
+  <Insert>,                                                   *'ctrlp-pasting'*
   <MiddleMouse>
-    Insert clipboard content into the prompt.
+    Paste the clipboard content into the prompt.
 
   <c-\>
-    Open a dialog to insert <cword>, <cfile>, content of the search register,
-    the last visual selection or the clipboard into the prompt.
-
-  <esc>,
-  <c-c>
-    Exit CtrlP.
-    Note: <c-c> can also be used to stop the scan if it’s taking too long.
+    Open a text dialog to paste <cword>, <cfile>, the content of the search
+    register, the last visual selection, the clipboard or any register into the
+    prompt.
 
 Choose your own mappings with |g:ctrlp_prompt_mappings|.
 
+----------------------------------------
 When inside the match window (press <s-tab> to switch):~
 
   a-z
 
     E.g. 'abc' is understood internally as 'a[^a]\{-}b[^b]\{-}c'
 
-b)  When in regexp mode, the input strings treated as a Vims regexp |pattern|
+b)  When in regexp mode, the input string's treated as a Vim's regexp |pattern|
     without any modification.
 
     E.g. 'abc\d*efg' will be read as 'abc\d*efg'.
     with a backslash: '\:'. When opening multiple files, the command will be
     executed on each opening file.
 
-    E.g. 'abc:45' will open the selected file and jump to line 45.
+    E.g. Use ':45' to open the selected file and jump to line 45.
 
-         'abc:/any\:string' will open the selected file and jump to the first
+         Use ':/any\:string' to open the selected file and jump to the first
          instance of 'any:string'.
 
-         'abc:+setf\ myfiletype|50' will open the selected file and set its
+         Use ':+setf\ myfiletype|50' to open the selected file and set its
          filetype to 'myfiletype', then jump to line 50.
 
-         'abc:diffthis' will open the selected files and run |:diffthis| on the
-         first 4 files (if marked).
+         Use ':diffthis' to open the selected files and run |:diffthis| on the
+         first 4 files (if they have been marked).
 
-    See also Vims |++opt| and |+cmd|.
+    See also: Vim's |++opt| and |+cmd|.
 
-d)  Type exactly two dots '..' at the start of the prompt and press enter to go
-    backward in the directory tree by 1 level. If the parent directory is
-    large, this might be slow.
+d)  Submit two dots '..' to go backward the directory tree by 1 level. To go
+    backward multiple levels, use one extra dot for each extra level:
+>
+         Raw input    Interpreted as
+         ..           ../
+         ...          ../../
+         ....         ../../../
+<
+    Note: if the parent directories are large and uncached, this can be slow.
 
-e)  Similarly, submit '/' or '\' to find and go to the project’s root. If the
-    project is large, using a VCS listing command to look for files might help
-    speeding up the intial scan (see |g:ctrlp_user_command| for more details).
+    You can also use '@cd path/' to change CtrlP's local working directory.
+    Use '@cd %:h' to change to the directory of the current file.
 
-    Note: e) and d) only work in find file mode and directory mode.
+e)  Similarly, submit '/' or '\' to find and go to the project's root.
+
+    If the project is large, using a VCS listing command to look for files
+    might help speeding up the intial scan (see |g:ctrlp_user_command| for more
+    details).
+
+    Note: e) and d) only work in file, directory and mixed modes.
 
 f)  Type the name of a non-existent file and press <c-y> to create it. Mark a
     file with <c-z> to create the new file in the same directory as the marked
     file.
 
-    E.g. 'parentdir/newfile.txt' will create a directory named 'parentdir' as
-         well as 'newfile.txt'.
+    E.g. Using 'newdir/newfile.txt' will create a directory named 'newdir' as
+         well as a file named 'newfile.txt'.
 
-         If 'some/old/dirs/oldfile.txt' is marked with <c-z>, then 'parentdir'
-         and 'newfile.txt' will be created in 'some/old/dirs'. The final path
-         will then be 'some/old/dirs/parentdir/newfile.txt'.
+         If an entry 'some/old/dirs/oldfile.txt' is marked with <c-z>, then
+         'newdir' and 'newfile.txt' will be created under 'some/old/dirs'. The
+         final path will then be 'some/old/dirs/newdir/newfile.txt'.
 
-         Use '\' in place of '/' on Windows (if |'ssl'| is not set).
+    Note: use '\' in place of '/' on Windows (if |'shellslash'| is not set).
 
-g)  Submit ? to open this help file.
+g)  In filename mode (toggle with <c-d>), you can use one primary pattern and
+    one refining pattern separated by a semicolon. Both patterns work like (a),
+    or (b) when in regexp mode.
+
+h)  Submit ? to open this help file.
 
 ===============================================================================
 EXTENSIONS                                                   *ctrlp-extensions*
     - Name: 'tag'
     - Command: ':CtrlPTag'
     - Search for a tag within a generated central tags file, and jump to the
-      definition. Use the Vims option |'tags'| to specify the names and the
+      definition. Use the Vim's option |'tags'| to specify the names and the
       locations of the tags file(s).
       E.g. set tags+=doc/tags
 
       + <cr> change the local working directory for CtrlP and keep it open.
       + <c-t> change the global working directory (exit).
       + <c-v> change the local working directory for the current window (exit).
-      + <c-x> change the global working directory to CtrlPs current local
+      + <c-x> change the global working directory to CtrlP's current local
         working directory (exit).
 
                                                                     *:CtrlPRTS*
       + <c-v> change the local working directory for the current window (exit).
       + <F7>
         - Wipe bookmark list.
-        - Or delete entries marked by <c-z>.
+        - Delete entries marked by <c-z>.
 
 ----------------------------------------
 Buffer Tag mode options:~
 
                                                    *'g:ctrlp_buftag_ctags_bin'*
-If ctags isnt in your $PATH, use this to set its location: >
+If ctags isn't in your $PATH, use this to set its location: >
   let g:ctrlp_buftag_ctags_bin = ''
 <
 
                                                    *'g:ctrlp_buftag_systemenc'*
-Match this with your OSs encoding (not Vims). The default value mirrors Vims
+Match this with your OS's encoding (not Vim's). The default value mirrors Vim's
 global |'encoding'| option: >
   let g:ctrlp_buftag_systemenc = &encoding
 <
     CtrlPNoEntries : the message when no match is found (Error)
     CtrlPMatch     : the matched pattern (Identifier)
     CtrlPLinePre   : the line prefix '>' in the match window
-    CtrlPPrtBase   : the prompt’s base (Comment)
-    CtrlPPrtText   : the prompt’s text (|hl-Normal|)
-    CtrlPPrtCursor : the prompt’s cursor when moving over the text (Constant)
+    CtrlPPrtBase   : the prompt's base (Comment)
+    CtrlPPrtText   : the prompt's text (|hl-Normal|)
+    CtrlPPrtCursor : the prompt's cursor when moving over the text (Constant)
 
   * In extensions:
-    CtrlPTabExtra  : the part of each line thats not matched against (Comment)
+    CtrlPTabExtra  : the part of each line that's not matched against (Comment)
     CtrlPBufName   : the buffer name an entry belongs to (|hl-Directory|)
     CtrlPTagKind   : the kind of the tag in buffer-tag mode (|hl-Title|)
     CtrlPqfLineCol : the line and column numbers in quickfix mode (Comment)
 <
 (submitted by Rich Alesi <github.com/ralesi>)
 
-* A standalone function to set the working directory to the project’s root, or
-  to the parent directory of the current file if a root can’t be found:
+* A standalone function to set the working directory to the project's root, or
+  to the parent directory of the current file if a root can't be found:
 >
   function! s:setcwd()
     let cph = expand('%:p:h', 1)
 
 Developed by Kien Nguyen <github.com/kien>.
 
-Projects homepage:   http://kien.github.com/ctrlp.vim
+Project's homepage:   http://kien.github.com/ctrlp.vim
 Git repository:       https://github.com/kien/ctrlp.vim
 Mercurial repository: https://bitbucket.org/kien/ctrlp.vim
 
 ===============================================================================
 CHANGELOG                                                     *ctrlp-changelog*
 
+Before 2012/05/15~
+
+    + Extend '..' (|ctrlp-input-formats| (d))
+    + New input format: '@cd' (|ctrlp-input-formats| (d))
+
+Before 2012/04/30~
+
     + New option: |g:ctrlp_mruf_default_order|
     + New feature: Bookmarked directories extension.
     + New commands: |:CtrlPBookmarkDir|
 Before 2011/10/12~
 
     + New features: Open multiple files.
-                    Pass Vims |++opt| and |+cmd| to the opening file
+                    Pass Vim's |++opt| and |+cmd| to the opening file
                     (|ctrlp-input-formats| (c))
                     Auto-complete each dir for |:CtrlP| [starting-directory]
     + New mappings: <c-z> mark/unmark a file to be opened with <c-o>.