dkprice / vim-easygrep

Fast and Easy Find and Replace Across Multiple Files
The Unlicense
325 stars 47 forks source link

Feature request: Automatically detect root folder by the presence of .git/.svn etc. #7

Closed clementpoh closed 9 years ago

clementpoh commented 10 years ago

The ctrlP plugin automatically detects the root folder by searching ancestors until it finds a .git, .svn, or even _darcs folder.

Would it be possible to implement this in easy grep as an option on startup?

dkprice commented 9 years ago

This could be a useful feature. . .I'm not sure how it would work though considering that easygrep is not recursive by default. It's worth noting that because Vim uses the current working directory, this behavior can be accomplished outside of the script somewhat easily. I'll consider whether it makes sense to make a builtin feature of EasyGrep.

dkprice commented 9 years ago

I just implemented this request in the unstable branch. Would you be willing to give it a try and let me know if it works for you? You can use the GrepRoot command or use let g:EasyGrepRoot="repository" in your .vimrc.

clementpoh commented 9 years ago

Looks like it works :+1: