ctrlpvim / ctrlp.vim

Active fork of kien/ctrlp.vim—Fuzzy file, buffer, mru, tag, etc finder.
ctrlpvim.github.com/ctrlp.vim
Other
5.58k stars 260 forks source link

filtering with the new buffer explorer #48

Open cvlmtg opened 9 years ago

cvlmtg commented 9 years ago

I think I found a weakness in the new buffer explorer. let's suppose I've loaded the files

app/code/local/Foo/Bar/Helper/Pdf.php
app/code/local/Xxx/Yyy/Helper/Data.php
etc...

If I open :CtrlPBuffer and type helperp I can't select Helper/Pdf.php, as the filtering is done on filename + path instead of path + filename, which imho is counter-intuitive...

(please see attached file, sorry for the bit of censorship)

untitled

tacahiroy commented 9 years ago

indeed - file and path names are backward. However, many people do like that, helperp, modelp, contp etc., I guess. @all What do you think providing an option to enable older view, displaying with absolute path? IMHO, both ways, file + dir and dir + file, are useful for users, it depends on usage though ofc.

mattn commented 9 years ago

Is this degrade?

cvlmtg commented 9 years ago

I think it can be a problem.

:CtrlPBuffer -> you need to specify first filename and then path :CtrlP -> you need to specify first path and the filename

there is no consistency, you need to remember when to use one method and when the other. even if you like or adapt to use filename + path you then need to do the opposite when using the file explorer

noscript commented 9 years ago

I made it that way only for comparability reasons, since the original buffer explorer included path in the list. @tacahiroy I will add options to display file + path separately or path/file as it was originally.

cvlmtg commented 9 years ago

thanks!

selecting only by filename (w/out the path) isn't the correct solution imho, as I've found myself editing various files with the same name but in different subdirectories, so the new option is a good solution. maybe in the future someone could also add all these feature to the file explorer too and thus have the same selection methods on both of them :)

noscript commented 8 years ago

With new buffer explorer it's possible to combine path and file name as follows:

let g:ctrlp_bufname_mod = ':~:.:p'
let g:ctrlp_bufpath_mod = ''