Text search feature #122

Manually merged
sloum merged 6 commits from text-find into develop 2020-01-04 19:20:29 +00:00
Owner

This is a proposed solution to #99

It is not the most beautiful code I have ever written, but it does the job. I'll make some notes on places that I think basic improvements might be able to be made. I also need to update the man page.

The basics:

  • / to start searching (enter text after the slash). Does not handle wildcards or regex. This is basic search.
  • n move to next line that contains a search term
  • N move to previous line containing a search term

Notes:

  • If you have searched for something and want to clear it, you can enter / and then hit enter
  • Moving around in your search results is not relative to your scroll position. Searching will always move to the first found item in the document from top to bottom. Next will always be the next row found in the search slice, not the next match found from your current position in the document.

I have tested this in large and small documents (with common words like and). I have found it to be pretty performant and have not noticed any slowdown (at least not on my xps-13 running ubuntu and st).

This is a proposed solution to #99 It is not the most beautiful code I have ever written, but it does the job. I'll make some notes on places that I think basic improvements might be able to be made. I also need to update the man page. The basics: - `/` to start searching (enter text after the slash). Does not handle wildcards or regex. This is basic search. - `n` move to next line that contains a search term - `N` move to previous line containing a search term Notes: - If you have searched for something and want to clear it, you can enter `/` and then hit enter - Moving around in your search results is _not_ relative to your scroll position. Searching will always move to the first found item in the document from top to bottom. Next will always be the next row found in the search slice, _not_ the next match found from your current position in the document. I have tested this in large and small documents (with common words like `and`). I have found it to be pretty performant and have not noticed any slowdown (at least not on my xps-13 running ubuntu and st).
sloum added the
documentation
non-urgent
enhancement
rendering
labels 2019-12-19 06:42:57 +00:00
asdf was assigned by sloum 2019-12-19 06:43:01 +00:00
sloum closed this pull request 2020-01-04 19:20:29 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sloum/bombadillo#122
No description provided.