rename paste command to put

This commit is contained in:
Gokcehan 2016-11-06 18:09:18 +03:00
parent daff377f2d
commit ec4cb78535
6 changed files with 16 additions and 16 deletions

View File

@ -35,7 +35,7 @@ var (
"invert",
"yank",
"delete",
"paste",
"put",
"renew",
"echo",
"cd",

10
doc.go
View File

@ -33,7 +33,7 @@ The following commands are provided by lf with default keybindings.
invert (default "v")
yank (default "y")
delete (default "d")
paste (default "p")
put (default "p")
renew (default "<c-l>")
The following commands are provided by lf without default keybindings.
@ -181,11 +181,11 @@ File Operations
lf uses the underlying "cp" and "mv" shell commands for file operations. For
this purpose, when you "yank" (i.e. copy) a file, it doesn't actually copy the
file on the disk, but only records its name to memory. The actual file
operation takes place when you do the "paste" in which case the "cp" command is
operation takes place when you do the "put" in which case the "cp" command is
used. Similarly the "mv" command is used for "delete" (i.e. cut or kill)
followed by "paste". These traditional names (e.g. "yank" and "delete") are
picked instead of the other common convention (e.g. copy and cut) to resemble
the default keybinds for these operations.
followed by "put". These traditional names (e.g. "yank", "delete", and "put")
are picked instead of the other common convention (e.g. copy and cut) to
resemble the default keybinds for these operations.
Opening Files

View File

@ -37,7 +37,7 @@ The following commands are provided by lf with default keybindings.
invert (default "v")
yank (default "y")
delete (default "d")
paste (default "p")
put (default "p")
renew (default "<c-l>")
The following commands are provided by lf without default keybindings.
@ -194,11 +194,11 @@ File Operations
lf uses the underlying "cp" and "mv" shell commands for file operations. For
this purpose, when you "yank" (i.e. copy) a file, it doesn't actually copy
the file on the disk, but only records its name to memory. The actual file
operation takes place when you do the "paste" in which case the "cp" command
operation takes place when you do the "put" in which case the "cp" command
is used. Similarly the "mv" command is used for "delete" (i.e. cut or kill)
followed by "paste". These traditional names (e.g. "yank" and "delete") are
picked instead of the other common convention (e.g. copy and cut) to
resemble the default keybinds for these operations.
followed by "put". These traditional names (e.g. "yank", "delete", and
"put") are picked instead of the other common convention (e.g. copy and cut)
to resemble the default keybinds for these operations.
Opening Files

View File

@ -309,9 +309,9 @@ func (e *CallExpr) eval(app *App, args []string) {
app.ui.message = fmt.Sprintf("%d files saved for move", len(app.nav.marks))
}
app.nav.marks = make(map[string]bool)
case "paste":
if err := app.nav.paste(); err != nil {
msg := fmt.Sprintf("paste: %s", err)
case "put":
if err := app.nav.put(); err != nil {
msg := fmt.Sprintf("put: %s", err)
app.ui.message = msg
log.Printf(msg)
return

2
nav.go
View File

@ -444,7 +444,7 @@ func (nav *Nav) save(keep bool) error {
return nil
}
func (nav *Nav) paste() error {
func (nav *Nav) put() error {
list, keep, err := loadFiles()
if err != nil {
return err

View File

@ -54,7 +54,7 @@ func init() {
gOpts.keys["v"] = &CallExpr{"invert", nil}
gOpts.keys["y"] = &CallExpr{"yank", nil}
gOpts.keys["d"] = &CallExpr{"delete", nil}
gOpts.keys["p"] = &CallExpr{"paste", nil}
gOpts.keys["p"] = &CallExpr{"put", nil}
gOpts.keys["<c-l>"] = &CallExpr{"renew", nil}
gOpts.cmds = make(map[string]Expr)