Permalink
Browse files

<c-w> correctly deletes inner word

  • Loading branch information...
1 parent 6fd7065 commit 467b194d4b73341c688d12d4a87ea908c5ec0936 @kien kien committed Sep 10, 2011
Showing with 14 additions and 12 deletions.
  1. +5 −3 autoload/ctrlp.vim
  2. +9 −9 doc/ctrlp.txt
View
8 autoload/ctrlp.vim
@@ -70,7 +70,7 @@ else
endif
if !exists('g:ctrlp_use_caching')
- let s:caching = 0
+ let s:caching = 1
else
let s:caching = g:ctrlp_use_caching
unl g:ctrlp_use_caching
@@ -525,8 +525,10 @@ func! s:PrtDeleteWord()
let s:nomatches = 1
let prt = g:CtrlP_prompt
let str = prt[0]
- if match(str, ' [^ ]\+$') >= 0
- let str = matchstr(str, '^.\+ \ze[^ ]\+$')
+ if match(str, '\W\w\+$') >= 0
+ let str = matchstr(str, '^.\+\W\ze\w\+$')
+ elseif match(str, '\w\W\+$') >= 0
+ let str = matchstr(str, '^.\+\w\ze\W\+$')
elseif match(str, '[ ]\+$') >= 0
let str = matchstr(str, '^.*[^ ]\+\ze[ ]\+$')
elseif match(str, ' ') <= 0
View
18 doc/ctrlp.txt
@@ -109,19 +109,19 @@ Set this to 1 to set full |regexp| search as the default mode: >
let g:ctrlp_regexp_search = 0
<
+ *'g:ctrlp_use_caching'*
+Set this to 0 to disable cross-sessions caching (flat files). When disabled,
+it’ll still be enabled if the working directory has more than 4000 files: >
+ let g:ctrlp_use_caching = 1
+<
+
*'g:ctrlp_cache_dir'*
Set the parent directory for the '.ctrlp_cache' directory: >
let g:ctrlp_cache_dir = $HOME
<
- *'g:ctrlp_use_caching'*
-Set this to 1 to always enable caching (flat files). Caching’s also temporarily
-enabled if the working directory has more than 4000 files: >
- let g:ctrlp_use_caching = 0
-<
-
*'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
<
@@ -301,7 +301,7 @@ Once inside the prompt:
Open selected file in a 'horizontal' split
<F5>
- Refresh the match window.
+ Refresh the match window and clear the cache.
<esc>,
<c-c>,
@@ -354,7 +354,7 @@ CHANGELOG
*ctrlp-update-2*
Update #2~
+ 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 mapping: <F5>.
+ New commands: |:CtrlPCurWD|,

0 comments on commit 467b194

Please sign in to comment.