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 reverse search functionality #958

Merged
merged 6 commits into from Nov 6, 2021
Merged

Add reverse search functionality #958

merged 6 commits into from Nov 6, 2021

Conversation

AloeareV
Copy link
Contributor

@AloeareV AloeareV commented Nov 2, 2021

It looks a good deal less efficient than forward search, but searching a 1500+ line file for 'a' doesn't seem to have caused any noticeable latency for me.

I wasn't sure what to do with extend_search_next and extend_search_prev, given that there's a shortage of letters left available, so I bound them to H and L.

This is my first commit that's actually adding/renaming functions, let me know if there are any naming conventions I should be aware of.

helix-term/src/keymap.rs Outdated Show resolved Hide resolved
helix-term/src/commands.rs Outdated Show resolved Hide resolved
helix-term/src/commands.rs Outdated Show resolved Hide resolved
@archseer
Copy link
Member

archseer commented Nov 2, 2021

The note in keymap.md should be removed too https://github.com/helix-editor/helix/blob/master/book/src/keymap.md#search

I think it's okay to use a suboptimal implementation (forward search is really inefficient too since we have to turn the Rope into a String) and we'll replace it once regex-automata supports NFA simulation.

helix-term/src/commands.rs Outdated Show resolved Hide resolved
helix-term/src/commands.rs Outdated Show resolved Hide resolved
helix-term/src/commands.rs Outdated Show resolved Hide resolved
helix-term/src/commands.rs Outdated Show resolved Hide resolved
@archseer
Copy link
Member

archseer commented Nov 6, 2021

Great work! 🎉

@archseer archseer merged commit 911b9b3 into helix-editor:master Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants