Closed ask1234560 closed 3 years ago
This is also a problem if you use CtrlP with vim-fugitive, because vim fugitive opens everything in a buffer. So after every commit, you have a ".git/COMIT_EDITMSG" in your MRU.
So what does g:ctrlp_custom_ignore
do
" ignore patterns in CtrlPMRU
fun! Ctrlpmru()
:CtrlPMRU<CR>
:silent !sed -i.bak -e '/\.git\//d' -e '/\/tmp\//d' "$XDG_CACHE_HOME/ctrlp/mru/cache.txt"
endf
I fixed it by adding the above code in init.vim and binding nnoremap <silent> <Leader>m :call Ctrlpmru()<CR>
.
It deletes the pattern after it invoked CtrlPMRU
, to avoid latency.
I fixed it by adding the above code in init.vim and binding
nnoremap <silent> <Leader>m :call Ctrlpmru()<CR>
. It deletes the pattern after it invokedCtrlPMRU
, to avoid latency.
Just tried it and it does not really work like I would like it to. It only filters out the lines after restarting vim, as the cache file is probably stored in memory.
Hi
i want to ignore /tmp directory in most recent files, how can i do it.
i am using this, but its not working