Is there a way to have highlighted search result not appear smash to right edge?
-
I have something that happens often enough to be really annoying.
Sometimes I have a file with long lines, horizontal scroll. I need to find text so I do a search. Each time I click to find the next match, it highlights the text and scrolls so that the found text is 100% to the right edge and I can’t see any of the text that follows it.
This is incredibly frustrating because a lot of the time I actually want to see some of the content that comes after my search term. This means every time I click to “find next”, I then have to scroll over slightly, then find, scroll, find, scroll, find, scroll until I get what I need.Obviously if I expect to find a lot of hits, I’ll just use the “find all” feature. Then in the search results box, my search term is not usually smashed to the edge and it’s easier to scan. But I don’t want a workaround, I would just like to know if search results can be moved to the center of the screen or even the start, rather than smashed to the right edge. It would make scanning through a long line so much quicker. I don’t always know how many it will find, so I don’t jump to the find all right away.
-
As far as I know, there is no way to avoid that.
The search I have in my Columns++ plugin goes out of its way to avoid that very behavior, but you probably don’t want use a plugin with a different search dialog and its own peculiarities just for this.
Could you turn on word wrapping (View | Word wrap) before you search? That might be less annoying.
-
@Zack-Wallace said in Is there a way to have highlighted search result not appear smash to right edge?:
This is incredibly frustrating because a lot of the time I actually want to see some of the content that comes after my search term.
I agree with @Coises for using the “wrapping” option.
There was another idea, but it will mean having to adjust the search term. You would add something like
.{10}
after the original search term. The search mode would have to be “regular expression” mode. It will then show 10 additional characters after the actual string you are looking for. However it would then highlight those additional characters as well which alters the visual aspect.Terry
-
There is an issue about this: