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