diff --git a/complete.go b/complete.go index dc76786f..f18e0373 100644 --- a/complete.go +++ b/complete.go @@ -14,6 +14,7 @@ var ( "map", "maps", "cmap", + "cmaps", "cmd", "quit", "up", diff --git a/doc.go b/doc.go index 36651c9f..b5ed9099 100644 --- a/doc.go +++ b/doc.go @@ -80,6 +80,7 @@ The following commands are provided by lf: tag tag-toggle (default 't') maps + cmaps The following command line commands are provided by lf: @@ -605,8 +606,9 @@ Delete the next word in forward direction. Capitalize/uppercase/lowercase the current word and jump to the next word. maps + cmaps -List all key mappings. +List all key mappings in normal mode or command-line editing mode. # Options diff --git a/docstring.go b/docstring.go index 7946d2c4..4d09f6e2 100644 --- a/docstring.go +++ b/docstring.go @@ -83,6 +83,7 @@ The following commands are provided by lf: tag tag-toggle (default 't') maps + cmaps The following command line commands are provided by lf: @@ -633,8 +634,9 @@ Delete the next word in forward direction. Capitalize/uppercase/lowercase the current word and jump to the next word. maps + cmaps -List all key mappings. +List all key mappings in normal mode or command-line editing mode. # Options diff --git a/eval.go b/eval.go index e6b7adfc..9c553344 100644 --- a/eval.go +++ b/eval.go @@ -2479,10 +2479,15 @@ func (e *callExpr) eval(app *app, args []string) { app.ui.cmdAccLeft = acc update(app) case "maps": - cleanUp := app.runShell("$PAGER", nil, "$|") + cleanUp := app.runShell(envPager, nil, "$|") io.Copy(app.cmdIn, listBinds(gOpts.keys)) app.cmdIn.Close() cleanUp() + case "cmaps": + cleanUp := app.runShell(envPager, nil, "$|") + io.Copy(app.cmdIn, listBinds(gOpts.cmdkeys)) + app.cmdIn.Close() + cleanUp() default: cmd, ok := gOpts.cmds[e.name] if !ok { diff --git a/lf.1 b/lf.1 index 10cdd113..b6ec295b 100644 --- a/lf.1 +++ b/lf.1 @@ -95,6 +95,7 @@ The following commands are provided by lf: tag tag-toggle (default 't') maps + cmaps .EE .PP The following command line commands are provided by lf: @@ -746,9 +747,10 @@ Capitalize/uppercase/lowercase the current word and jump to the next word. .PP .EX maps + cmaps .EE .PP -List all key mappings. +List all key mappings in normal mode or command-line editing mode. .SH OPTIONS This section shows information about options to customize the behavior. Character ':' is used as the separator for list options '[]int' and '[]string'. .PP