kien / ctrlp.vim

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

support for starting in multiple directories #362

Open darthdeus opened 11 years ago

darthdeus commented 11 years ago

It would be awesome if we could specify multiple directories where to search, for example

map <leader>dm :CtrlP app/assets/javascripts/foo/models app/assets/javascripts/bar/models<cr>

or even better with a *

map <leader>dm :CtrlP app/assets/javascripts/*/models 

Is there any workaround which would allow this?

bling commented 11 years ago

it's not optimal but you could simulate most of this functionality using symlinks.

darthdeus commented 11 years ago

Can you be more specific? Do you mean symlinking app/assets/javascripts/foo/models under app/assets/javascripts/models/foo and app/assets/javascripts/bar/models under app/assets/javascripts/models/bar?

bling commented 11 years ago

as in:

mkdir ~/dev
cd ~/dev
ln -s /path/to/app/foo/models foo-models
ln -s /path/to/app/bar/models bar-models

then just set g:ctrlp_follow_symlinks=1 in your vimrc.

svec commented 11 years ago

I second the original request: having a way to search an arbitrary number of directories, without using symlinks, would be fantastic!

mitchellhenke commented 11 years ago

This would be great for scripting CtrlP to search specific directories.

AgentCosmic commented 11 years ago

+1 for this. I have a project with many files and folder. Would be much easier to search for files with this feature.

chibicode commented 11 years ago

:+1 for the original request!

sirbrillig commented 10 years ago

+1 for this or a global variable that allows setting a set of default directories in which to begin the search.

majjoha commented 10 years ago

I'd love to see this too. What workarounds (except from symlinks) do people currently use to scope their search to only a selection of folders?

ghost commented 10 years ago

+1 !

akarl commented 10 years ago

+1 !

borko84 commented 9 years ago

+1

chris-lesage commented 9 years ago

Alternatively, an option to search the default "path" variable that :find uses. Path allows you to append multiple directories with :set path+=/more/dirs/here/

akarl commented 9 years ago

@chris-lesage I like it

bohrshaw commented 9 years ago

+1

nshkg commented 8 years ago

+

dreamsComeTrue commented 7 years ago

Can't wait to find this implementation! :) +1

mawkler commented 7 years ago

+2

Alieff commented 6 years ago

+1

kgfly commented 6 years ago

+1

1 symlinks is # very/unacceptable tedious when you have 10+ projects on the computer!

2 symlinks does not work on Windows!

Please add the support.

kgfly commented 6 years ago

Similarly, please add support for multiple directories for :CtrlPDir, eg:

On Windows, :CtrlPDir c:\aaa d:\bbb e:\ccc On Linux/Mac :CtrlPDir /aaa /bbb /ccc

They are very useful!

jgandt commented 6 years ago

Reminder, this project is unmaintained. We should probably re-open this over at https://github.com/ctrlpvim/ctrlp.vim.

kgfly commented 6 years ago

Thanks. I created a new request in that repro https://github.com/ctrlpvim/ctrlp.vim/issues/436 ^_^