summaryrefslogtreecommitdiffstats
path: root/pkg/gui/editors.go
diff options
context:
space:
mode:
authorRyooooooga <eial5q265e5@gmail.com>2022-09-23 20:04:39 +0900
committerRyooooooga <eial5q265e5@gmail.com>2022-09-24 00:00:30 +0900
commit212e19f598e9ea96939959f55a2cf7c422721212 (patch)
tree454efbe15c4a153761d4fbd4a853eb4665b1c2f9 /pkg/gui/editors.go
parent1c8292430765b391177856e6589b08038d6f0f28 (diff)
feat: add support for emacs keybindings
Diffstat (limited to 'pkg/gui/editors.go')
-rw-r--r--pkg/gui/editors.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/gui/editors.go b/pkg/gui/editors.go
index 6f40c6d58..2fd606a3b 100644
--- a/pkg/gui/editors.go
+++ b/pkg/gui/editors.go
@@ -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):