I like using the CtrlP plugin's CtrlPBuffer command for quickly switching between buffers, as well as using CtrlP for navigating to files not yet opened. However, I have one annoyance I'd like to fix. When I use CtrlPBuffer, it shows a list of files with the filename in the first column and the containing path in the second column. This means when I want to match a file, I need to enter the filename first and then the path. However, for the regular CtrlP command, this is reversed. I'd like to have this consistent, i.e. that for CtrlPBuffer I can enter parts of the path before entering parts of the filename. For example, if my directory tree contains:folder/file.pyfolder2/file.pyEntering 2f will match the second file when using CtrlP, but not when using CtrlPBuffer. Is there any way to make this work?
CtrlPBuffer path before filename
plugin ctrlp
Set ctrlp_bufname_mod on your .vimrc file:let g:ctrlp_bufname_mod = ':p'You can finetune this, check filename-modifiers in CtrlP docs (:help filename-modifiers)