kien / ctrlp.vim

Fuzzy file, buffer, mru, tag, etc finder.
kien.github.com/ctrlp.vim
7.26k stars 677 forks source link

Search only siblings of current file? #732

Open mikabytes opened 7 years ago

mikabytes commented 7 years ago

Love CtrlP for all my projects. Noticed quite often I'm changing to a sibling file of current file/buffer, and have been trying to write a script to enter such a search mode.

nmap <Leader>a :CtrlP $(expand('%:p:h'))<CR>

Things are not quite working as I expected though. The path somehow seems to be remembered for the next time when I want to make a global search.

Any ideas?