mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-03 13:21:56 +02:00
feat: add support for emacs keybindings
This commit is contained in:
parent
1c82924307
commit
212e19f598
@ -38,10 +38,16 @@ func (gui *Gui) handleEditorKeypress(textArea *gocui.TextArea, key gocui.Key, ch
|
||||
textArea.ToggleOverwrite()
|
||||
case key == gocui.KeyCtrlU:
|
||||
textArea.DeleteToStartOfLine()
|
||||
case key == gocui.KeyCtrlK:
|
||||
textArea.DeleteToEndOfLine()
|
||||
case key == gocui.KeyCtrlA || key == gocui.KeyHome:
|
||||
textArea.GoToStartOfLine()
|
||||
case key == gocui.KeyCtrlE || key == gocui.KeyEnd:
|
||||
textArea.GoToEndOfLine()
|
||||
case key == gocui.KeyCtrlW:
|
||||
textArea.BackSpaceWord()
|
||||
case key == gocui.KeyCtrlY:
|
||||
textArea.Yank()
|
||||
|
||||
// TODO: see if we need all three of these conditions: maybe the final one is sufficient
|
||||
case ch != 0 && mod == 0 && unicode.IsPrint(ch):
|
||||
|
Loading…
x
Reference in New Issue
Block a user