Bump version to 1.6.9
* Some minor internal changes. * Update vim.org version.
This commit is contained in:
parent
a13d90fd2a
commit
99542d295b
@ -2,7 +2,7 @@
|
||||
" File: autoload/ctrlp.vim
|
||||
" Description: Fuzzy file, buffer, mru and tag finder.
|
||||
" Author: Kien Nguyen <github.com/kien>
|
||||
" Version: 1.6.8
|
||||
" Version: 1.6.9
|
||||
" =============================================================================
|
||||
|
||||
" Static variables {{{1
|
||||
@ -60,6 +60,8 @@ fu! s:opts()
|
||||
\ 'PrtClear()': ['<c-u>'],
|
||||
\ 'PrtSelectMove("j")': ['<c-j>', '<down>'],
|
||||
\ 'PrtSelectMove("k")': ['<c-k>', '<up>'],
|
||||
\ 'PrtSelectMove("t")': ['<home>'],
|
||||
\ 'PrtSelectMove("b")': ['<end>'],
|
||||
\ 'PrtHistory(-1)': ['<c-n>'],
|
||||
\ 'PrtHistory(1)': ['<c-p>'],
|
||||
\ 'AcceptSelection("e")': ['<cr>', '<c-m>', '<2-LeftMouse>'],
|
||||
@ -72,7 +74,7 @@ fu! s:opts()
|
||||
\ 'ToggleType(1)': ['<c-f>', '<c-up>'],
|
||||
\ 'ToggleType(-1)': ['<c-b>', '<c-down>'],
|
||||
\ 'PrtExpandDir()': ['<tab>', '<c-i>'],
|
||||
\ 'PrtInsert("w")': ['<F2>'],
|
||||
\ 'PrtInsert("w")': ['<F2>', '<insert>'],
|
||||
\ 'PrtInsert("s")': ['<F3>'],
|
||||
\ 'PrtInsert("v")': ['<F4>'],
|
||||
\ 'PrtInsert("+")': ['<F6>'],
|
||||
@ -402,8 +404,8 @@ fu! s:Update(str)
|
||||
if notail == oldstr && !empty(notail) && !exists('s:force')
|
||||
retu
|
||||
en
|
||||
let bfn = notail != '' && match(notail, '\v/|\\:@!') < 0
|
||||
if s:regexp && match(notail, '\\:\@!') >= 0
|
||||
let bfn = s:byfname && notail != '' && match(notail, '\v/|\\:@!') < 0
|
||||
if s:byfname && s:regexp && match(notail, '\\:\@!') >= 0
|
||||
let bfn = s:byfname
|
||||
en
|
||||
let lines = exists('g:ctrlp_nolimit') && empty(notail) ? copy(g:ctrlp_lines)
|
||||
@ -497,12 +499,7 @@ endf
|
||||
fu! s:PrtExpandDir()
|
||||
let prt = s:prompt
|
||||
if prt[0] == '' | retu | en
|
||||
let parts = split(prt[0], '[\/]\ze[^\/]\+[\/:]\?$')
|
||||
if len(parts) == 1
|
||||
let [base, seed] = ['', parts[0]]
|
||||
elsei len(parts) == 2
|
||||
let [base, seed] = parts
|
||||
en
|
||||
let [base, seed] = s:headntail(prt[0])
|
||||
let dirs = s:dircompl(base, seed)
|
||||
if len(dirs) == 1
|
||||
let prt[0] = dirs[0]
|
||||
@ -544,7 +541,7 @@ fu! s:PrtCurEnd()
|
||||
endf
|
||||
|
||||
fu! s:PrtSelectMove(dir)
|
||||
exe 'norm!' a:dir
|
||||
exe 'keepj norm!' ( a:dir =~ '^[tb]$' ? {'t': 'gg', 'b': 'G'}[a:dir] : a:dir )
|
||||
if !exists('g:ctrlp_nolimit') | let s:cline = line('.') | en
|
||||
if line('$') > winheight(0) | cal s:BuildPrompt(0, s:Focus()) | en
|
||||
endf
|
||||
@ -751,12 +748,12 @@ endf
|
||||
|
||||
fu! s:SpecInputs(str)
|
||||
let [str, type] = [a:str, s:type()]
|
||||
if str == '..' && type =~ '0\|dir'
|
||||
if str == '..' && type =~ '\v^(0|dir)$'
|
||||
cal s:parentdir(getcwd())
|
||||
cal s:SetLines(s:itemtype)
|
||||
cal s:PrtClear()
|
||||
retu 1
|
||||
elsei ( str == '/' || str == '\' ) && type =~ '0\|dir'
|
||||
elsei str =~ '^[\/]$' && type =~ '\v^(0|dir)$'
|
||||
cal s:SetWD(2, 0)
|
||||
cal s:SetLines(s:itemtype)
|
||||
cal s:PrtClear()
|
||||
@ -795,12 +792,7 @@ fu! s:CreateNewFile(...) "{{{1
|
||||
if md == 'cancel' | retu | en
|
||||
en
|
||||
let str = s:sanstail(str)
|
||||
let parts = split(str, '[\/]\ze[^\/]\+[\/:]\?$')
|
||||
if len(parts) == 1
|
||||
let [base, fname] = ['', parts[0]]
|
||||
elsei len(parts) == 2
|
||||
let [base, fname] = parts
|
||||
en
|
||||
let [base, fname] = s:headntail(str)
|
||||
if fname =~ '^[\/]$' | retu | en
|
||||
if exists('s:marked') && len(s:marked)
|
||||
" Use the first marked file's path
|
||||
@ -808,11 +800,8 @@ fu! s:CreateNewFile(...) "{{{1
|
||||
let base = path.s:lash(path).base
|
||||
let str = fnamemodify(base.s:lash.fname, ':.')
|
||||
en
|
||||
if base == '' | let optyp = fname | el
|
||||
cal ctrlp#utils#mkdir(base)
|
||||
if isdirectory(base)
|
||||
let optyp = str
|
||||
en
|
||||
if base != '' | if isdirectory(ctrlp#utils#mkdir(base))
|
||||
let optyp = str | en | el | let optyp = fname
|
||||
en
|
||||
if !exists('optyp') | retu | en
|
||||
let filpath = fnamemodify(optyp, ':p')
|
||||
@ -1025,6 +1014,11 @@ fu! s:findcommon(items, seed)
|
||||
retu cmn
|
||||
endf
|
||||
|
||||
fu! s:headntail(str)
|
||||
let parts = split(a:str, '[\/]\ze[^\/]\+[\/:]\?$')
|
||||
retu len(parts) == 1 ? ['', parts[0]] : len(parts) == 2 ? parts : []
|
||||
endf
|
||||
|
||||
fu! s:lash(...)
|
||||
retu match(a:0 ? a:1 : getcwd(), '[\/]$') < 0 ? s:lash : ''
|
||||
endf
|
||||
@ -1359,7 +1353,8 @@ fu! ctrlp#msg(msg)
|
||||
endf
|
||||
|
||||
fu! s:openfile(cmd, filpath, ...)
|
||||
let cmd = a:cmd =~ '^e$\|^b$' && &modified ? 'hid '.a:cmd : a:cmd
|
||||
let cmd = a:cmd =~ '^[eb]$' && &modified ? 'hid '.a:cmd : a:cmd
|
||||
let cmd = cmd =~ '^tab' ? tabpagenr('$').cmd : cmd
|
||||
let tail = a:0 ? a:1 : s:tail()
|
||||
try
|
||||
exe cmd.tail.' '.ctrlp#fnesc(a:filpath)
|
||||
|
@ -91,6 +91,7 @@ fu! ctrlp#tag#accept(mode, str)
|
||||
let cmd = fnd[0] == 1 ? cmds[md][0] : cmds[md][1]
|
||||
let cmd = cmd == 'tj' && &modified ? 'hid '.cmd : cmd
|
||||
try
|
||||
let cmd = cmd =~ '^tab' ? tabpagenr('$').cmd : cmd
|
||||
if fnd[0] == 1
|
||||
if cmd != ''
|
||||
exe cmd
|
||||
|
@ -54,12 +54,11 @@ fu! ctrlp#utils#mkdir(dir)
|
||||
if exists('*mkdir')
|
||||
sil! cal mkdir(a:dir, 'p')
|
||||
en
|
||||
retu a:dir
|
||||
endf
|
||||
|
||||
fu! ctrlp#utils#writecache(lines, ...)
|
||||
let cache_dir = exists('a:1') ? a:1 : s:cache_dir
|
||||
cal ctrlp#utils#mkdir(cache_dir)
|
||||
if isdirectory(cache_dir)
|
||||
if isdirectory(ctrlp#utils#mkdir(exists('a:1') ? a:1 : s:cache_dir))
|
||||
sil! cal writefile(a:lines, exists('a:2') ? a:2 : ctrlp#utils#cachefile())
|
||||
if !exists('a:1')
|
||||
let g:ctrlp_newcache = 0
|
||||
|
@ -1,4 +1,4 @@
|
||||
*ctrlp.txt* Fuzzy file, buffer, mru and tag finder. v1.6.8
|
||||
*ctrlp.txt* Fuzzy file, buffer, mru and tag finder. v1.6.9
|
||||
*CtrlP* *ControlP* *'ctrlp'* *'ctrl-p'*
|
||||
===============================================================================
|
||||
# #
|
||||
@ -458,66 +458,66 @@ Once inside the prompt:~
|
||||
|
||||
<c-j>,
|
||||
<down>
|
||||
Move selection down
|
||||
Move selection down.
|
||||
|
||||
<c-k>,
|
||||
<up>
|
||||
Move selection up
|
||||
Move selection up.
|
||||
|
||||
<c-a>
|
||||
Move the cursor to the 'start' of the prompt
|
||||
Move the cursor to the 'start' of the prompt.
|
||||
|
||||
<c-e>
|
||||
Move the cursor to the 'end' of the prompt
|
||||
Move the cursor to the 'end' of the prompt.
|
||||
|
||||
<c-h>,
|
||||
<left>,
|
||||
<c-^>
|
||||
Move the cursor one character to the 'left'
|
||||
Move the cursor one character to the 'left'.
|
||||
|
||||
<c-l>,
|
||||
<right>
|
||||
Move the cursor one character to the 'right'
|
||||
Move the cursor one character to the 'right'.
|
||||
|
||||
<c-]>,
|
||||
<bs>
|
||||
Delete the preceding character
|
||||
Delete the preceding character.
|
||||
|
||||
<del>
|
||||
Delete the current character
|
||||
Delete the current character.
|
||||
|
||||
<c-w>
|
||||
Delete a preceding inner word
|
||||
Delete a preceding inner word.
|
||||
|
||||
<c-u>
|
||||
Clear the input field
|
||||
Clear the input field.
|
||||
|
||||
<cr>
|
||||
Open selected file in the active window if possible.
|
||||
|
||||
<c-t>
|
||||
Open selected file in a new 'tab'
|
||||
Open selected file in a new 'tab' after the last tabpage.
|
||||
|
||||
<c-v>
|
||||
Open selected file in a 'vertical' split
|
||||
Open selected file in a 'vertical' split.
|
||||
|
||||
<c-cr>,
|
||||
<c-s>,
|
||||
<c-x>
|
||||
Open selected file in a 'horizontal' split
|
||||
Open selected file in a 'horizontal' split.
|
||||
|
||||
<c-y>
|
||||
Create a new file and its parent directories.
|
||||
|
||||
<c-n>
|
||||
Next string in the prompt’s history
|
||||
Next string in the prompt’s history.
|
||||
|
||||
<c-p>
|
||||
Previous string in the prompt’s history
|
||||
Previous string in the prompt’s history.
|
||||
|
||||
<c-z>
|
||||
- Mark/unmark a file to be opened with <c-o>.
|
||||
- Mark/unmark a file to create a new file in the same directory with <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>.
|
||||
@ -726,13 +726,13 @@ Special thanks:~
|
||||
Forked and suggested the support for VCS listing commands.
|
||||
|
||||
* Yasuhiro Matsumoto <github.com/mattn>
|
||||
Added option to use Migemo for Japanese language.
|
||||
Added option to use Migemo for Japanese filenames.
|
||||
|
||||
* Kyo Nagashima <github.com/hail2u>
|
||||
Made some enhancements to file opening mappings.
|
||||
|
||||
* Piet Delport <github.com/pjdelport>
|
||||
Changed default cache dir to meet XDG spec.
|
||||
Changed the default cache directory to meet XDG spec.
|
||||
|
||||
* Kent Sibilev <github.com/datanoise>
|
||||
Debugged and made various patches.
|
||||
@ -746,7 +746,7 @@ Special thanks:~
|
||||
===============================================================================
|
||||
CHANGELOG *ctrlp-changelog*
|
||||
|
||||
+ New option: |g:ctrlp_mruf_last_entered| change MRU to recently-entered
|
||||
+ New option: |g:ctrlp_mruf_last_entered| change MRU to recently-entered.
|
||||
|
||||
Before 2012/01/15~
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user