-
Notifications
You must be signed in to change notification settings - Fork 676
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
git submodules use top most .git as root #792
Comments
honnestly I also find this a nuisance but I fail to see how it could be implemented. The project is aware it has submodules, but the submodules themselves are not aware they are part of a bigger project, so how would CtrlP detect this ? ex: HOME = /home/alexis/.git -> my home folder is versionned for keeping my config files, wallpapers and watnot, I avoid ctrlP when editing something in my home as it will take forever to index as you can imagine and is quicker an less ressource intensive to just directly open the files I want MAINPROJECT = /home/alexis/projects/MainProject/.git -> this i my project directory, it contains submodules and ctrlP works fine SUBMODULE = /home/alexis/projects/MainProject/src/submodule/.git -> this is a submodule of MAINPROJECT and when I ctrlP into it then I can't ctrlP back out wich is a nuisance SUBSUBMODULE = /home/alexis/projects/MainProject/src/submodule/lib/subsubmodule/.git -> a submodule in a submodule ? yes, why not, may not be the prettiest pattern but then again having a single monolithic project is not pretty either so I would consider this to be ok in many cases Problems:
I can see a few ways of going about this but none very good
Frankly I think the best solution would be a per-project vim configuration as that would make the most sense and avoid breaking anyone's workflow/use case, but I think you'll have to look elsewhere for that as it would have nothing to do with CtrlP |
Hi @AlexisFinn, One possible solution would be such an algorithm:
This way, in your example, your home directory would safely not be treated as the project root, whether you marked |
Hi All,
When using git submodules, is it possible to tell ctrlp to use the top most .git to indicate the project root?
I find it frustrating when I'm in a parent file, ctrl-p down into a submodule file and then I can no longer ctrlp back up to a parent project file.
Thanks
The text was updated successfully, but these errors were encountered: