Skip to content

Improve the usability of the cursor movement in the commit window #4412

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

Open
gitter-me opened this issue Mar 21, 2025 · 2 comments
Open

Improve the usability of the cursor movement in the commit window #4412

gitter-me opened this issue Mar 21, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@gitter-me
Copy link

Is your feature request related to a problem? Please describe.
In the commit window only char by char movement with the left and right arrow is possible.
In input fields (or most text editors) if you press ctrl (option on mac) and the left/right arrow key the cursor moves word by word not character by character.

Describe the solution you'd like
Move word by word, if ctrl (option on mac) is pressed with the arrow keys

Describe alternatives you've considered
None

Additional context
To make it perfect support also selection with the movent keys.
If shift is pressed it will be selected (shift+arrow selects the character / shift+ctrl+arrow selects the whole word, moving in reverse un-selects)
I know that implementing selection correctly is quite complicated and I don't know how lazygit implemented the TUI (custom UI or a library), and therefore I don't know if a selection is possible at all

@gitter-me gitter-me added the enhancement New feature or request label Mar 21, 2025
@gitter-me gitter-me changed the title Improve the usablity of the cursor movement in the commit window Improve the usability of the cursor movement in the commit window Mar 21, 2025
@stefanhaller
Copy link
Collaborator

Option-left and option-right work for me on Mac to jump by word. If they don't work for you, then maybe it has something to with the terminal emulator you are using. I don't remember what it is on Windows, probably Alt-left/right.

You can also click with the mouse in the text to move the cursor, that can sometimes be faster for longer paragraphs of text.

@gitter-me
Copy link
Author

On Linux I use the standard Gnome Terminal and on Windows the new Windows Terminal and the modern Powershell (pwsh) so nothing too fancy or exotic.

On Linux I just tried Alt+left/right and you are correct it works.
But this goes against the normal convention, in every system UI textbox/input and in (almost) all texteditors (vscode, sublime, notepad, gedit), it is Ctrl and not Alt.

I assume the contributors of lazygit are all on Mac? (On Mac its Alt)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants