As a user, I'd like a search function to find text within the current document #99
Labels
No Label
blocked
bug
build
documentation
duplicate
enhancement
finger
gemini
gopher
help wanted
http
in progress
invalid
local
needs-info
non-code
non-functional
non-urgent
question
release
rendering
suggestion
telnet
terminal
urgent
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sloum/bombadillo#99
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As per functions in vim and less, as well as page searching found in most browsers. It's not often that I've needed to search a document in Bombadillo, but tried last night and thought it might be useful. I've written up a draft spec below for a simple implementation for your consideration.
Search is initiated via the key
/
.A search pattern is entered, followed by the enter key, and if the pattern is found the document jumps to its position (displayed as closely to the middle of the screen as is possible).
n
tries to find the next occurrence of the pattern, searching toward the end of a document, whileN
tries to find the previous occurrence, searching toward the beginning.Searching may have some visual indications - the current search pattern, if found in the document, could be highlighted (colour inverted). Highlighting could be persistent, with all found instances highlighted, but would recommend that only the currently found pattern is highlighted, and that highlighting is cleared when any other action occurs.
Search patterns would probably be precise string match only. Additional functionality like case matching, finding whole words only, or regex searching, may be possible but not essential.
I have thought about this one and knew it would come up eventually. This will be complicated-ish. It sort of ties into the issue of allowing formatting (which we currently do not do, and in fact explicitly remove). If we can solve the issue surrounding display of styled text then I think we can make this work. I see no reason to not allow a regex string from the user (we are already including the regex library in the binary by way of the URL module, so size shouldnt be a major factor).
I have been thinking a lot about this. I have some ideas that should provide a similar feel to the
less
implementation of this feature. I do not plan on allowing regex or wildcards though. Simple find plus navigating around the found elements withn
andN
. I'll update more as the basic idea starts to develop.Implemented in #122. It works perfectly, thank you!