From 204881e649cc0ec4413191c42152f5020def9475 Mon Sep 17 00:00:00 2001 From: Jussi Tiira Date: Wed, 20 Oct 2021 19:58:24 +0000 Subject: [PATCH] vim/less style first/last line movement --- ui/keybindings.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ui/keybindings.go b/ui/keybindings.go index 56c5717..1f9ca08 100644 --- a/ui/keybindings.go +++ b/ui/keybindings.go @@ -60,11 +60,21 @@ func setKeyBinding(c *controller, g *gocui.Gui) error { return err } + err = g.SetKeybinding("", 'g', gocui.ModNone, c.cursorHome) + if err != nil { + return err + } + err = g.SetKeybinding("", gocui.KeyEnd, gocui.ModNone, c.cursorEnd) if err != nil { return err } + err = g.SetKeybinding("", 'G', gocui.ModNone, c.cursorEnd) + if err != nil { + return err + } + err = g.SetKeybinding("", gocui.KeyPgdn, gocui.ModNone, c.cursorPageDown) if err != nil { return err