Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Files stuck in cache, intended behavior? #523

Closed
kswope opened this Issue · 3 comments

2 participants

@kswope

.vimrc

let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlPMixed'
let g:ctrlp_working_path_mode = 0

shell

rm -rf .cache/ctrlp/
mkdir ctrlp-test

vim

:cd ~/ctrlp-test/ 
<ctrl-p>
== NO ENTRIES ==

Great!

shell

touch ~/ctrlp-test/HERE-1
touch ~/ctrlp-test/HERE-2

vim

<ctrl-p>
<F5>

HERE-1
>HERE-2

Great!

shell

rm ~/ctrlp-test/HERE-2

vim

<ctrl-p>
<F5>

>HERE-1

Great!

vim

:e /etc/hosts
:bd
<ctrl-p>
<F5>

/etc/hosts
>HERE-1

/etc/hosts lingers!

shell

rm ~/ctrlp-test/HERE-2

vim

<ctrl-p>
<F5>

/etc/hosts

its like a bad smell that wont go away!

vim

:CtrlPClearAllCaches 
<ctrl-p>
<F5>

/etc/hosts

I would expect to rebuild the cache according to ctrlp_working_path_mode
and not leave files in the cache outside the 'ctrlp working path'.

I also tried

let g:ctrlp_working_path_mode = 'c'
@kien
Owner

It's because you're using CtrlPMixed which includes files, buffers, and MRU files. The /etc/hosts entry you see is a MRU entry.

@kien kien closed this
@kswope

So nothing cleans out a MRU listing aside from physically deleting the cache?

And :CtrlP mode includes buffers as well as files? But CtrlpBuffer is just buffers and CtrlpMixed also includes mrus?

I've been running ctrlp for quite a while and never new normal mode was files+buffers but not mrus. I recommend a doc change

"Run :CtrlP or :CtrlP [starting-directory] to invoke CtrlP in find file mode."

To something like

Run :CtrlP or :CtrlP [starting-directory] to invoke CtrlP in find file mode. (includes buffers)

Thats why I was using mixed mode, I didn't think regular mode included buffers.

@kien
Owner

No, :CtrlP only shows files.

To clear MRUs, press <F7> while in MRU mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.