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

Add a search option to current_buffer_fuzzy_find #2114

Closed
thezealousfool opened this issue Aug 8, 2022 · 1 comment
Closed

Add a search option to current_buffer_fuzzy_find #2114

thezealousfool opened this issue Aug 8, 2022 · 1 comment
Labels
enhancement Enhancement to performance, inner workings or existent features

Comments

@thezealousfool
Copy link

New to telescope. Thank you for the plugin.

I was creating some keymaps for visual mode selected text search. telescope.builtin.grep_string lets me pass a search option so I can search for the selected text in the cwd. Can we have a similar option for current_buffer_fuzzy_find so that we can search the selected text in the current buffer.

Thank you.

@thezealousfool thezealousfool added the enhancement Enhancement to performance, inner workings or existent features label Aug 8, 2022
@fdschmidt93
Copy link
Member

Any picker accepts a default_text parameter, that is

require "telescope.builtin".current_buffer_fuzzy_find { default_text = $YOUR_TEXT }

will set the prompt buffer with $YOUR_TEXT which you can populate with your visual selection search. This will eventually be documented as part of #1954.

Closing as I'm very optimistic this addresses your issue. Kindly let me know otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to performance, inner workings or existent features
Projects
None yet
Development

No branches or pull requests

2 participants