Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order of MRU matches #41

Open
ptzz opened this issue Oct 29, 2017 · 4 comments
Open

Order of MRU matches #41

ptzz opened this issue Oct 29, 2017 · 4 comments

Comments

@ptzz
Copy link

ptzz commented Oct 29, 2017

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

@lervag
Copy link

lervag commented Dec 4, 2017

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

@ptzz
Copy link
Author

ptzz commented Dec 4, 2017

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.

@lervag
Copy link

lervag commented Dec 4, 2017

Thanks!

@tankorsmash
Copy link

Thanks for this work around!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants