ctrlp.vim icon indicating copy to clipboard operation
ctrlp.vim copied to clipboard

support for starting in multiple directories

Open darthdeus opened this issue 12 years ago • 23 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?

darthdeus avatar Feb 15 '13 12:02 darthdeus

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

bling avatar Mar 03 '13 18:03 bling

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?

darthdeus avatar Mar 03 '13 21:03 darthdeus

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.

bling avatar Mar 05 '13 14:03 bling

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

svec avatar Apr 05 '13 15:04 svec

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

mitchellhenke avatar Apr 08 '13 14:04 mitchellhenke

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

AgentCosmic avatar Jun 06 '13 04:06 AgentCosmic

:+1 for the original request!

chibicode avatar Sep 01 '13 13:09 chibicode

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

sirbrillig avatar Mar 01 '14 06:03 sirbrillig

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?

majjoha avatar Jul 17 '14 16:07 majjoha

+1 !

ghost avatar Aug 01 '14 09:08 ghost

+1 !

akarl avatar Sep 08 '14 07:09 akarl

+1

borko84 avatar Nov 29 '14 07:11 borko84

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/

chris-lesage avatar Dec 03 '14 09:12 chris-lesage

@chris-lesage I like it

akarl avatar Dec 03 '14 09:12 akarl

+1

bohrshaw avatar Dec 28 '14 11:12 bohrshaw

nshkg avatar Mar 24 '16 09:03 nshkg

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

dreamsComeTrue avatar Apr 11 '17 21:04 dreamsComeTrue

+2

mawkler avatar Aug 08 '17 13:08 mawkler

+1

Alieff avatar Jan 03 '18 03:01 Alieff

+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 avatar May 08 '18 17:05 kgfly

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!

kgfly avatar May 08 '18 17:05 kgfly

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

jgandt avatar May 11 '18 13:05 jgandt

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

kgfly avatar May 11 '18 19:05 kgfly