ctrlp-py-matcher icon indicating copy to clipboard operation
ctrlp-py-matcher copied to clipboard

Order of MRU matches

Open ptzz opened this issue 8 years ago • 4 comments

It seems like the order gets messed up in MRU mode when enabling ctrlp-py-matcher. Looks like list gets sorted by name instead of in MRU order

ptzz avatar Oct 29 '17 12:10 ptzz

This also affects me. MRU is one of my main uses of CTRLP, and so I find this issue quite important.

lervag avatar Dec 04 '17 09:12 lervag

I've worked around it like this:

" Disable custom match func in some cases as it's
" - not respecting MRU order in MRU mode
" - not respecting g:ctrlp_by_filename in buffer mode
func! DisableCtrlPMatchFunc(cmd)
    let g:ctrlp_match_func = {}
    execute a:cmd
    let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch' }
endfunc
nnoremap <silent> <leader>m :call DisableCtrlPMatchFunc('CtrlPMRU')<CR>
nnoremap <silent> <leader>b :call DisableCtrlPMatchFunc('CtrlPBuffer')<CR>

It works fine since the matching speedup is not really necessary for MRU and buffers.

ptzz avatar Dec 04 '17 10:12 ptzz

Thanks!

lervag avatar Dec 04 '17 12:12 lervag

Thanks for this work around!

tankorsmash avatar Jul 04 '22 17:07 tankorsmash