support for starting in multiple directories #362

darthdeus opened this Issue Feb 15, 2013 · 16 comments

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?


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


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?


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.


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


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


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


:+1 for the original request!


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


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?


+1 !




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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment