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 Accumulate Find Results Setting #1478

Open
garyemerson opened this issue Nov 1, 2016 · 4 comments
Open

Add Accumulate Find Results Setting #1478

garyemerson opened this issue Nov 1, 2016 · 4 comments

Comments

@garyemerson
Copy link

garyemerson commented Nov 1, 2016

Currently results from Find in Files accumulate in the Find Results buffer. I see how this can be useful and others too. However, I think the opposite behavior, where the results are cleared on each new search, could also be useful.

Cases it could be useful:

  • Jumping to the start of the results of the most recent search is just jumping to the beginning of the buffer.
  • You can jump around the results buffer but still be confident that any result entry is from your most recent search. This way you can focus on the context of the match, line number and file instead of the match itself.
  • Even though there are stats at the bottom, you'd get an additional visual cue from the minimap of how many results there are.

It'd be great if this behavior could be exposed through a user setting like accumulate_find_results or something. Anyone else think this might be nice to have?

@keith-hall
Copy link
Collaborator

keith-hall commented Nov 2, 2016

To demonstrate this behavior, here is an example of how the "Find Results" tab might look after performing two searches - one for "hello" and one for "world":

Searching 0 files for "hello" (regex)

0 matches

Searching 0 files for "world" (regex)

0 matches

Note that there is nothing to stop you from closing the tab or deleting it's contents before performing another search, but I can see how having an accumulate_find_results preference might help with productivity. Also, it's possible to rename the tab when outputting results to a buffer to get a clean tab per search.

You may also find a plugin like https://packagecontrol.io/packages/BetterFindBuffer useful.

@FichteFoll
Copy link
Collaborator

I'd like to suggest another option for this: Opening new search result in a new buffer (either numbered or by including the search term in the tab name).

@evandrocoan
Copy link

evandrocoan commented Nov 2, 2016

Or may be even better, show the results on reverse order and folding the last search result as Notepad++ does, it would be the same effect as the OP @garyemerson is asking for and we would have the search history to open it, in case we think it is interesting.

image

@garyemerson
Copy link
Author

garyemerson commented Nov 2, 2016

@keith-hall Yea that's what I do now which is what made me think it might be nice for sublime to just do the clearing for me. Thanks for the plugin suggestion! This definitely seems doable with a plugin.

@FichteFoll, @evandrocoan great ideas! I was originally thinking just a boolean setting but I think with your suggestions that a multiple-option setting would make more sense. Options could be something like "in_buffer", "none", "new_buffer" and "fold".

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

No branches or pull requests

4 participants