<c-w> correctly deletes inner word

This commit is contained in:
Kien N 2011-09-10 19:51:49 +07:00
parent 6fd7065d9e
commit 467b194d4b
2 changed files with 14 additions and 12 deletions

View File

@ -70,7 +70,7 @@ else
endif endif
if !exists('g:ctrlp_use_caching') if !exists('g:ctrlp_use_caching')
let s:caching = 0 let s:caching = 1
else else
let s:caching = g:ctrlp_use_caching let s:caching = g:ctrlp_use_caching
unl g:ctrlp_use_caching unl g:ctrlp_use_caching
@ -525,8 +525,10 @@ func! s:PrtDeleteWord()
let s:nomatches = 1 let s:nomatches = 1
let prt = g:CtrlP_prompt let prt = g:CtrlP_prompt
let str = prt[0] let str = prt[0]
if match(str, ' [^ ]\+$') >= 0 if match(str, '\W\w\+$') >= 0
let str = matchstr(str, '^.\+ \ze[^ ]\+$') let str = matchstr(str, '^.\+\W\ze\w\+$')
elseif match(str, '\w\W\+$') >= 0
let str = matchstr(str, '^.\+\w\ze\W\+$')
elseif match(str, '[ ]\+$') >= 0 elseif match(str, '[ ]\+$') >= 0
let str = matchstr(str, '^.*[^ ]\+\ze[ ]\+$') let str = matchstr(str, '^.*[^ ]\+\ze[ ]\+$')
elseif match(str, ' ') <= 0 elseif match(str, ' ') <= 0

View File

@ -109,19 +109,19 @@ Set this to 1 to set full |regexp| search as the default mode: >
let g:ctrlp_regexp_search = 0 let g:ctrlp_regexp_search = 0
< <
*'g:ctrlp_use_caching'*
Set this to 0 to disable cross-sessions caching (flat files). When disabled,
itll still be enabled if the working directory has more than 4000 files: >
let g:ctrlp_use_caching = 1
<
*'g:ctrlp_cache_dir'* *'g:ctrlp_cache_dir'*
Set the parent directory for the '.ctrlp_cache' directory: > Set the parent directory for the '.ctrlp_cache' directory: >
let g:ctrlp_cache_dir = $HOME let g:ctrlp_cache_dir = $HOME
< <
*'g:ctrlp_use_caching'*
Set this to 1 to always enable caching (flat files). Cachings also temporarily
enabled if the working directory has more than 4000 files: >
let g:ctrlp_use_caching = 0
<
*'g:ctrlp_by_filename'* *'g:ctrlp_by_filename'*
Set this to 1 to set search by file-name (not full path) as the default: > Set this to 1 to set search by filename (not full path) as the default: >
let g:ctrlp_by_filename = 0 let g:ctrlp_by_filename = 0
< <
@ -301,7 +301,7 @@ Once inside the prompt:
Open selected file in a 'horizontal' split Open selected file in a 'horizontal' split
<F5> <F5>
Refresh the match window. Refresh the match window and clear the cache.
<esc>, <esc>,
<c-c>, <c-c>,
@ -354,7 +354,7 @@ CHANGELOG
*ctrlp-update-2* *ctrlp-update-2*
Update #2~ Update #2~
+ Extended the behavior of |g:ctrlp_persistent_input| + Extended the behavior of |g:ctrlp_persistent_input|
+ New option: |g:ctrlp_dotfiles| + New options: |g:ctrlp_dotfiles|
+ New input format: '..' (section 5.d) + New input format: '..' (section 5.d)
+ New mapping: <F5>. + New mapping: <F5>.
+ New commands: |:CtrlPCurWD|, + New commands: |:CtrlPCurWD|,