Skip to content
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

suggestion: let user control "search in this dir and subdirs" vs "search within project dir" in a more interactive way #1

Open
Dieterbe opened this issue Oct 22, 2016 · 2 comments

Comments

@Dieterbe
Copy link

seems like this behavior can currently only be toggled via the g:rg_derive_root setting.
it would be nice if there was a way to override the setting, and interactively trigger a search in the entire project dir, or force only to search in CWD and below.

thoughts?

PS: cool plugin, thank you!

@jremmen
Copy link
Owner

jremmen commented Oct 23, 2016

Yeah that sounds like a useful thing to have. Maybe a command that searches with the setting flipped? Or would it be more useful to have an easy way to toggle the setting and then combine that with the current search method manually?

@Dieterbe
Copy link
Author

I need to use this a bit more to form a decent opinion, but I think i'll be using both in-project search and in-cwd search, and i see both as a search action i will want to be able invoke interactively on an as needed basis. I definitely would avoid doing it as 2 commands (a toggle or a config set followed by the actual search), that's too many keypresses and too much mental overhead.

I already use map <leader>rg :Rg<space> . i could probably finagle out a mapping that woud set the option, do a search, and then unset the option again. but it just seems easier if that functionality was in the plugin.

anyway just my thoughts. cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants