atom / find-and-replace

Find and replace in a single buffer and in the project
MIT License
242 stars 196 forks source link

Adding option to select number of chars to display before the search term #1098

Closed Roko131 closed 5 years ago

Roko131 commented 5 years ago

Summary

When searching a term in a single page- lets say FindMe when the cursor is far right on the screen- so far that you would need to scroll left to see any other FindMe result. lets say:

line 1, very long sentence with many words very long sentence with many words, FindMe

line 30, dog hello FindMe
...
line 50, cat hello FindMe

Now I would like the find the dog sentence but I'm not sure which animal was that so I look for FindMe but it never shows me the context before the searched term:

image

I would like to know the info before the search term: That's the context I need:

image

So just adding an option in the find setting:

The number of characters to display before a search term is found Default: 10

So instead of this: image

I will get this: image

Motivation

Whenever I search for terms I ends up needing to scroll left after every search. It could save time but more importantly save frustration.

Describe alternatives you've considered

Diving to code and add a minimal chars (I think 10 to 15 chars should be enough) to show before searching term.

Additional context

Just like the find and replace in project has some settings to help you use it wisely: image

The find in a single page lacks that functionality.

Many times we search for words but not actually needing the words themselves but rather the environments surrounding these words.

rsese commented 5 years ago

Thanks for the feedback! Also thanks for the writeup, more details like this is appreciated and helps us understand what's being reported.

While I do see how a setting like this could be helpful, as mentioned in the issue template the team is unlikely to prioritize new functionality at the moment. But I'll go ahead and mention this as feedback to the other maintainers for you.

Because we treat our issues list as the Atom team's backlog, we'll close this out since it's not something the team will work on but thanks again for the feedback.