Open StefanMich opened 4 years ago
Agreed that this should be a thing. I'm not sure that termbox (one of our dependencies) supports those keys, but I'm assuming there must be some way to read them. Then it's just a matter of adding handlers for those keys in gocui's (another one of our dependencies)simpleEditor
function
Maybe you could extend this functionality and also use the home
and end
keys. We use a different naming convention for our branches and when checking out a branch it always means removing the "origin" from the name.
I made a pull request that adds this functionality: #1142
I have just some puzzling moments while not being able to move cursor by word with CTRL+Left/Right in the commit dialog. Or perhaps this issue is old now and there is a way to jump between words, instead of between characters?
Update: I've just checked Ctrl+B/F as per https://github.com/jesseduffield/lazygit/pull/2104 but it does not work for me either in version 0.38.2 on Windows (Git Bash).
I have just some puzzling moments while not being able to move cursor by word with CTRL+Left/Right in the commit dialog. Or perhaps this issue is old now and there is a way to jump between words, instead of between characters?
Update: I've just checked Ctrl+B/F as per #2104 but it does not work for me either in version 0.38.2 on Windows (Git Bash).
Same over here. None of the keybinds work for me.
Same here. And besides Ctrl + Arrow to move a word, I request also for Ctrl + Backspace / Ctrl + Del to remove a word.
Move by word is mapped to alt + left/right, not ctrl. I'm relatively sure that this is because ctrl is not technically possible (unless the underlying tcell library implements https://github.com/gdamore/tcell/issues/671).
Delete word is available, and mapped to ctrl-w.
Move by word is mapped to alt + left/right, not ctrl. I'm relatively sure that this is because ctrl is not technically possible (unless the underlying tcell library implements gdamore/tcell#671).
Delete word is available, and mapped to ctrl-w.
Thank you very much !
My Lazygit is 0.40.2
installed in WSL 2 (Ubuntu 20.04), I can confirm Ctrl + w works like a charm and move by words is Alt + Shift + Arrow.
Describe the bug In prompts with text fields (commit, checkout, etc..), I would like to navigate by word, which is implemented in most textfields other places (text editors, browsers, etc.). When I press ctrl + left arrow as I am used to, lazygit interprets the key combination as a shortcut which operates in the menu, and not in the text field
To Reproduce Steps to reproduce the behavior:
Expected behavior Cursor moves to the beginning of the word
Desktop (please complete the following information):