-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search in multiple directories? #14
Comments
It's not too hard to iterate over the directories you've added in However I'm not sure how you can integrate this with CtrlP. You need to change that
The vim script should be something like:
This is untested code, not sure if it will work but it could be a starting point. |
Hey!! Actually, the only code CtrlP needs is something like
I tried this one but got "undefined g:VimpanelRoots" any ideas?
|
You're right... Hmm, the way I see it there are two options. First is to make the above script a function, and call it via a keyboard mapping whenever you need to search something, but that would be a little cumbersome. Second option is for me to update the plugin, and provide some kind of callback functionality, where the plugin executes a user specified function when This would be the code for the first option (again, untested), with the F12 keyboard shortcut.
See if this works first, and then we'll see if I can update the plugin. Haven't coded in vimscript in years, need to get back in shape :) |
Nice! Great job with that. No clue about the I'll investigate adding a callback mechanism to the plugin, to avoid the need of a keyboard mapping. |
Awesome! Well, if it helps, my typical workflow is: Having one project folder (with passwords, logins and stuff in .txt files) and one or more code folders In code folder, typically:
Ctrlp +rg to fuzzy search everything Vim Startify gives me session loading, saving and auto-persistence So, in summary, these 3 plugins plus RipGrep provide same functionality as SublimeText or VSCode VimPanel + CtrlP + VimStartify |
Ok, so I added Your code should look like this:
Let me know when you manage to test this, and if it solves your problem. thanks |
I think I should also run the callback when the panel is loaded. I'll make the change tomorrow |
I've been wondering how to quickly search in multiple directories like sublimetext.
Seems that CtrlP doesn't support that
ctrlpvim/ctrlp.vim#436
NerdTree doesn't do it
preservim/nerdtree#215
My workflow always involves jumping from one directory to another.
Do you know a way of ?
This Setting let me to it with one directory, but I wonder if there's a way of accomplish the same thing merging results in all open directories:
The text was updated successfully, but these errors were encountered: