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

Search #5

Open
altsem opened this issue Feb 20, 2024 · 2 comments
Open

Search #5

altsem opened this issue Feb 20, 2024 · 2 comments

Comments

@altsem
Copy link
Owner

altsem commented Feb 20, 2024

Search down/up in any screen.
Bind to / and ?, n and N to go to next/prev?

n is currently bound to moving the cursor down. May want to bind ? to help.
Does it make more sense to have separate vim/emacs-like keybind profiles?

@altsem altsem added help wanted Extra attention is needed and removed help wanted Extra attention is needed labels Mar 3, 2024
@mattgallagher92
Copy link

This would be great!

My guess is that people who prefer Emacs-like keybindings are likely to use Emacs and prefer to stay in Emacs, hence use Magit rather than gitu. So I'd argue that it makes sense to focus on making a good workflow for those using vim-style keybindings (which seems to be gitu's default). In particular, I'd support removing the p and n bindings to select previous/next to enable them to be used for other things.

(Note: I use vim-style keybindings for code editing and I'm a Magit user who basically only uses Emacs - with Evil mode for vi-style keybindings - for Magit, so I bring some hefty bias 😅)

That said, it's going to be hard to get anything perfect - I'd love to be able to use h and l for fine-grained text selection when in visual mode (for example to search for a commit by message, then copy something like the hash), but there are obvious conflicts with help and log actions. You could get around that with full-on modes like Vim has, but I imagine that adds significant implementation complexity, and increases the barrier to entry for those not used to Vim. Certainly not worth consideration in the short term.

@altsem
Copy link
Owner Author

altsem commented Mar 20, 2024

I think dropping n/p for navigation might be reasonable. In the future, the keybinds should be configurable anyway.
Been thinking about adding a "copy hash" keybind somewhere.

altsem added a commit that referenced this issue Apr 6, 2024
@altsem altsem changed the title Simple search Search Apr 6, 2024
altsem added a commit that referenced this issue Apr 6, 2024
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

No branches or pull requests

2 participants