kien / ctrlp.vim

Fuzzy file, buffer, mru, tag, etc finder.
kien.github.com/ctrlp.vim
7.26k stars 676 forks source link

MRU search doesn't ignore ctrlp_custom_ignore #768

Closed ckangnz closed 5 years ago

ckangnz commented 5 years ago

When I manually open a file, that is included in my ctrlp_custom_ignore, it still shows up in my MRU search.

For example, I would manually browse the files through netrw, and open a mp4 file to check ( I just wanted to see how the code looks like on mp4), then when I open MRU search, *.mp4 is still found in the list. I also see .git/COMMIT_EDITMSG which happen to be opened while I was editing git message, and now it is in my MRU search.

Refreshing doesn't work, and I have no idea how to clear my browse history.

Here is my setting

nmap <C-p> :CtrlP<cr>
nmap <C-t> :CtrlPTag<cr>
nmap <C-e> :CtrlPMRUFiles<cr>
let g:ctrlp_working_path_mode = 'ra'
let g:ctrlp_match_window = 'top,order:ttb,min:1,max:20,results:20'
let g:ctrlp_custom_ignore = {
    \'dir': '\v[\/](node_modules|target|dist)|(\.(swp|ico|git|svn))$',
    \'file': '\v\.(dll|min.js|min.css|jpg|png|mp4)$'
\}
let g:ctrlp_mruf_relative = 1
nmap <F5> :CtrlPClearCache<cr>