Make :maps work on Windows and add :cmaps. (#1201)
* Make `:maps` work on Windows This makes the `:maps` command from #1146 work on Windows. This (as well as `:maps` itself) is based on @jackielli's work in #1146 and #1152. I intend to refactor the code in this or a separate PR, but I thought I'd submit the critical and simple bit first. * Add `:cmaps` command After the naming scheme from #1146, it would seem weird to not have a :cmaps command. This could help with issues like #876.
This commit is contained in:
1 parent
bb45d15b83
commit
1e1486fc02
5 files changed
+16
-4
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user