From 420174fc537ba986a716964db7af0bd189252944 Mon Sep 17 00:00:00 2001 From: Kien N Date: Fri, 13 Jan 2012 23:02:17 +0700 Subject: [PATCH] Ignore filename and context of tags Fix #76 --- autoload/ctrlp.vim | 4 ++-- doc/ctrlp.txt | 16 ++++++++-------- readme.md | 1 - 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/autoload/ctrlp.vim b/autoload/ctrlp.vim index cc6aad3..0240d05 100644 --- a/autoload/ctrlp.vim +++ b/autoload/ctrlp.vim @@ -1324,11 +1324,11 @@ fu! s:walker(max, pos, dir) endf fu! s:matchfname(item, pat) - retu match(split(a:item, '[\/]\ze[^\/]\+$')[-1], a:pat) + retu match(split(a:item, s:lash)[-1], a:pat) endf fu! s:matchtab(item, pat) - retu match(split(a:item, '\t\+[^\t]\+$')[0], a:pat) + retu match(split(a:item, '\t\+')[0], a:pat) endf fu! s:maxf(len) diff --git a/doc/ctrlp.txt b/doc/ctrlp.txt index f05f7d5..23e7449 100644 --- a/doc/ctrlp.txt +++ b/doc/ctrlp.txt @@ -297,15 +297,15 @@ If non-zero, this will enable opening multiple files with and : > < For the number: - If bigger than 1, it’ll be used as the maximum number of windows or tabs to - create when opening the files, the rest will be hidden buffers. + create when opening the files (the rest will be hidden buffers). - If is 1, will open all files, each in a new window or new tab. - If no number is given, only the first file will be opened in a window, either new window or reused, and the rest will be hidden buffers. -For the letter: - t - each in a tab - h - each in a horizontal split - v - each in a vertical split -Reuse the current window: +For the letters: + t - each in a new tab + h - each in a new horizontal split + v - each in a new vertical split + Reuse the current window: tr, hr, vr - open the first file in the current window, then the remaining files in @@ -322,8 +322,8 @@ Pressing or will then prompt for a keypress. The key can be: v - open in vertical split(s) r - open in current window (for only) , - cancel and go back to |CtrlP| - Any other key - use the default behavior specified by |g:ctrlp_open_new_file| - and |g:ctrlp_open_multi|. + Any other key - use the behavior specified with |g:ctrlp_open_new_file| and + |g:ctrlp_open_multi|. *'g:ctrlp_dont_split'* When opening a file with , |CtrlP| avoids opening it in windows created by diff --git a/readme.md b/readme.md index f5e78b5..669ee30 100644 --- a/readme.md +++ b/readme.md @@ -48,7 +48,6 @@ e.g. `abc:45` will open the file matched the pattern and jump to line 45. .bzr/ _darcs/ root.dir - .vimprojects * If you want to exclude directories or files from the search, you can use the Vim’s option `wildignore` and/or the option `g:ctrlp_custom_ignore`.