ctrlpvim / ctrlp.vim

Active fork of kien/ctrlp.vim—Fuzzy file, buffer, mru, tag, etc finder.
ctrlpvim.github.com/ctrlp.vim
Other
5.56k stars 259 forks source link

fuzzy matching stops working sometimes #166

Open akulakov opened 8 years ago

akulakov commented 8 years ago

Given a path like survey/models.py, when I first installed the plugin, I was able to type in sumo and match this path, now only contiguous substrings match, e.g. surve but not sumo.

The same issue happens not just for .py files but also e.g. .html files.

[edit: it seems like it was restored after a gvim restart, but I'm wondering what could have triggered it, and how to fix without restart?]

[edit2: I'm using macvim 7.4 1-769]

wsdjeg commented 8 years ago

i have test your case! there is no issue maybe it is due to my config;

NeoBundle 'ctrlpvim/ctrlp.vim'
NeoBundle 'FelikZ/ctrlp-py-matcher'
let g:ctrlp_clear_cache_on_exit = 0
let g:ctrlp_cache_dir = $HOME.'/.cache/ctrlp'
let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch' }
wsdjeg commented 8 years ago

i have just copy something related to this issue,if you want to have a look at the whole configuration here is my vimrc: https://github.com/wsdjeg/DotFiles/blob/master/vimrc

akulakov commented 8 years ago

It doesn't happen on fresh restart of vim but happens after a day or a few days of use. This has happened at least once so far. I will try to further debug when it happens again.

marcus commented 8 years ago

I'm seeing the same issue. My ctrl-p config is pretty straightforward - uses ag and doesn't cache. Restarting gvim restores fuzzy searching. Mac, Vim 7.4 1-769

let g:ctrlp_use_caching = 0
if executable('ag')
    set grepprg=ag\ --nogroup\ --nocolor
    let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
else
  let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files . -co --exclude-standard', 'find %s -type f']
  let g:ctrlp_prompt_mappings = {
    \ 'AcceptSelection("e")': ['<space>', '<cr>', '<2-LeftMouse>'],
    \ }
endif
leftiness commented 8 years ago

Noticed this today. Haven't figured it out yet. Restarting didn't fix it...

NVIM 0.1.5-dev Ubuntu Trusty

I don't think this was happening on my work PC, which is running the same versions with the same config...

" ctrlpvim/ctrlp.vim ---------------------------------------------------------

" open fuzzy search
nnoremap <leader>t :CtrlP<cr>

" ignore stuff from .gitignore
let g:ctrlp_user_command=['.git', 'cd %s && git ls-files -co --exclude-standard']

" order search from top to bottom
let g:ctrlp_match_window='bottom,order:ttb'

" respect changed working path
let g:ctrlp_working_path_mode=0

" always open files in new tabs
let g:ctrlp_prompt_mappings={
  \ 'AcceptSelection("e")': ['<c-t>'],
  \ 'AcceptSelection("t")': ['<cr>', '2-LeftMouse'],
  \ }