From 5d5d00e30b4070940ab99f27e43de2291bb1d61f Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Wed, 27 Jun 2018 21:33:00 +0300 Subject: [PATCH] add special keys to default keybindings --- doc.go | 8 ++++---- docstring.go | 8 ++++---- opts.go | 4 ++++ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/doc.go b/doc.go index 942ee1b..a2a1ef1 100644 --- a/doc.go +++ b/doc.go @@ -14,15 +14,15 @@ The following commands are provided by lf with default keybindings: up (default 'k' and '') half-up (default '') - page-up (default '') + page-up (default '' and '') down (default 'j' and '') half-down (default '') - page-down (default '') + page-down (default '' and '') updir (default 'h' and '') open (default 'l' and '') quit (default 'q') - top (default 'gg') - bottom (default 'G') + top (default 'gg' and '') + bottom (default 'G' and '') toggle (default '') invert (default 'v') unmark (default 'u') diff --git a/docstring.go b/docstring.go index a1ae728..22086ae 100644 --- a/docstring.go +++ b/docstring.go @@ -18,15 +18,15 @@ The following commands are provided by lf with default keybindings: up (default 'k' and '') half-up (default '') - page-up (default '') + page-up (default '' and '') down (default 'j' and '') half-down (default '') - page-down (default '') + page-down (default '' and '') updir (default 'h' and '') open (default 'l' and '') quit (default 'q') - top (default 'gg') - bottom (default 'G') + top (default 'gg' and '') + bottom (default 'G' and '') toggle (default '') invert (default 'v') unmark (default 'u') diff --git a/opts.go b/opts.go index 63bcd79..948756c 100644 --- a/opts.go +++ b/opts.go @@ -76,17 +76,21 @@ func init() { gOpts.keys[""] = &callExpr{"up", nil, 1} gOpts.keys[""] = &callExpr{"half-up", nil, 1} gOpts.keys[""] = &callExpr{"page-up", nil, 1} + gOpts.keys[""] = &callExpr{"page-up", nil, 1} gOpts.keys["j"] = &callExpr{"down", nil, 1} gOpts.keys[""] = &callExpr{"down", nil, 1} gOpts.keys[""] = &callExpr{"half-down", nil, 1} gOpts.keys[""] = &callExpr{"page-down", nil, 1} + gOpts.keys[""] = &callExpr{"page-down", nil, 1} gOpts.keys["h"] = &callExpr{"updir", nil, 1} gOpts.keys[""] = &callExpr{"updir", nil, 1} gOpts.keys["l"] = &callExpr{"open", nil, 1} gOpts.keys[""] = &callExpr{"open", nil, 1} gOpts.keys["q"] = &callExpr{"quit", nil, 1} gOpts.keys["gg"] = &callExpr{"top", nil, 1} + gOpts.keys[""] = &callExpr{"top", nil, 1} gOpts.keys["G"] = &callExpr{"bottom", nil, 1} + gOpts.keys[""] = &callExpr{"bottom", nil, 1} gOpts.keys[""] = &callExpr{"toggle", nil, 1} gOpts.keys["v"] = &callExpr{"invert", nil, 1} gOpts.keys["u"] = &callExpr{"unmark", nil, 1}