ctrlp-py-matcher
ctrlp-py-matcher copied to clipboard
Order of MRU matches
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
This also affects me. MRU is one of my main uses of CTRLP, and so I find this issue quite important.
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.
Thanks!
Thanks for this work around!