support for starting in multiple directories #362

Open
darthdeus opened this Issue Feb 15, 2013 · 16 comments
@darthdeus

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

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

@darthdeus

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

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

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

@mitchellhenke

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

@AgentCosmic

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

@chibicode

:+1 for the original request!

@sirbrillig

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

@majjoha

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?

@akarl818

+1 !

@borko84

+1

@chris-lesage

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