atom / fuzzy-finder

Find and open files quickly
MIT License
275 stars 138 forks source link

Prefill query from selection #314

Closed ColCh closed 6 years ago

ColCh commented 7 years ago

Description of the Change

When you select text, then activate fuzzy-finder, it will look for selection in active editor.

If there is some text selected, it will use it as query - and select text inside of query as well

Alternate Designs

Didn't noticed any. Only in Nuclide's nuclide-quick-open there is analogue for it, but you can't use it without installing entire nuclide package

Benefits

Now you don't need to Copy-Paste your selection in fuzzy finder.

This speedups programming performance :)

Possible Drawbacks

May be opened a bit* slowly, because it looks for editor selected text

Applicable Issues

resolves https://github.com/atom/fuzzy-finder/issues/161

lee-dohm commented 6 years ago

We are interested in taking this feature. We need two modifications first:

  1. We need this functionality behind a configuration option
  2. We need to default to the current behavior (so default to off)

Once that's done, we'll take a deeper look.

Thanks for the submission!

ColCh commented 6 years ago

Done.

Now this behaviour is turned on by config variable. And this config variable is turned off by default, meaning current behaviour. Also, I've merged master changer with decaffeinated files.

Please review, ping @lee-dohm

smashwilson commented 6 years ago

:+1: Works like a charm. Thanks for the contribution! :tada:

ColCh commented 6 years ago

@smashwilson great! Thank you!