parent
0298630114
commit
563fae38d2
1
comp.go
1
comp.go
@ -36,6 +36,7 @@ var (
|
||||
"yank",
|
||||
"delete",
|
||||
"put",
|
||||
"clear",
|
||||
"renew",
|
||||
"sync",
|
||||
"echo",
|
||||
|
1
doc.go
1
doc.go
@ -32,6 +32,7 @@ The following commands are provided by lf with default keybindings.
|
||||
toggle (default "<space>")
|
||||
invert (default "v")
|
||||
yank (default "y")
|
||||
clear (default "c")
|
||||
delete (default "d")
|
||||
put (default "p")
|
||||
renew (default "<c-l>")
|
||||
|
@ -36,6 +36,7 @@ The following commands are provided by lf with default keybindings.
|
||||
toggle (default "<space>")
|
||||
invert (default "v")
|
||||
yank (default "y")
|
||||
clear (default "c")
|
||||
delete (default "d")
|
||||
put (default "p")
|
||||
renew (default "<c-l>")
|
||||
|
12
eval.go
12
eval.go
@ -303,6 +303,18 @@ func (e *callExpr) eval(app *app, args []string) {
|
||||
app.nav.save(false)
|
||||
app.nav.saves = make(map[string]bool)
|
||||
saveFiles(nil, false)
|
||||
case "clear":
|
||||
if err := saveFiles(nil, false); err != nil {
|
||||
msg := fmt.Sprintf("clear: %s", err)
|
||||
app.ui.message = msg
|
||||
log.Printf(msg)
|
||||
return
|
||||
}
|
||||
if err := sendRemote("send sync"); err != nil {
|
||||
msg := fmt.Sprintf("clear: %s", err)
|
||||
app.ui.message = msg
|
||||
log.Printf(msg)
|
||||
}
|
||||
case "renew":
|
||||
app.ui.sync()
|
||||
app.ui.renew()
|
||||
|
1
opts.go
1
opts.go
@ -58,6 +58,7 @@ func init() {
|
||||
gOpts.keys["v"] = &callExpr{"invert", nil}
|
||||
gOpts.keys["y"] = &callExpr{"yank", nil}
|
||||
gOpts.keys["d"] = &callExpr{"delete", nil}
|
||||
gOpts.keys["c"] = &callExpr{"clear", nil}
|
||||
gOpts.keys["p"] = &callExpr{"put", nil}
|
||||
gOpts.keys["<c-l>"] = &callExpr{"renew", nil}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user