Add clearmaps command (#1286)
This commit is contained in:
1 parent
c874a2c56f
commit
2c13e0d7d6
5 files changed
+27
No files matched your search
@@ -43,6 +43,7 @@ var (
|
|||||||
"glob-select",
|
"glob-select",
|
||||||
"glob-unselect",
|
"glob-unselect",
|
||||||
"calcdirsize",
|
"calcdirsize",
|
||||||
|
"clearmaps",
|
||||||
"copy",
|
"copy",
|
||||||
"cut",
|
"cut",
|
||||||
"paste",
|
"paste",
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ The following commands are provided by lf:
|
|||||||
glob-select
|
glob-select
|
||||||
glob-unselect
|
glob-unselect
|
||||||
calcdirsize
|
calcdirsize
|
||||||
|
clearmaps
|
||||||
copy (default 'y')
|
copy (default 'y')
|
||||||
cut (default 'd')
|
cut (default 'd')
|
||||||
paste (default 'p')
|
paste (default 'p')
|
||||||
@@ -382,6 +383,12 @@ Calculate the total size for each of the selected directories.
|
|||||||
Option 'info' should include 'size' and option 'dircounts' should be disabled to show this size.
|
Option 'info' should include 'size' and option 'dircounts' should be disabled to show this size.
|
||||||
If the total size of a directory is not calculated, it will be shown as '-'.
|
If the total size of a directory is not calculated, it will be shown as '-'.
|
||||||
|
|
||||||
|
clearmaps
|
||||||
|
|
||||||
|
Remove all keybindings associated with the `map` command.
|
||||||
|
This command can be used in the config file to remove the default keybindings.
|
||||||
|
For safety purposes, `:` is left mapped to the `read` command, and `cmap` keybindings are retained so that it is still possible to exit `lf` using `:quit`.
|
||||||
|
|
||||||
copy (default 'y')
|
copy (default 'y')
|
||||||
|
|
||||||
If there are no selections, save the path of the current file to the copy buffer, otherwise, copy the paths of selected files.
|
If there are no selections, save the path of the current file to the copy buffer, otherwise, copy the paths of selected files.
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ The following commands are provided by lf:
|
|||||||
glob-select
|
glob-select
|
||||||
glob-unselect
|
glob-unselect
|
||||||
calcdirsize
|
calcdirsize
|
||||||
|
clearmaps
|
||||||
copy (default 'y')
|
copy (default 'y')
|
||||||
cut (default 'd')
|
cut (default 'd')
|
||||||
paste (default 'p')
|
paste (default 'p')
|
||||||
@@ -398,6 +399,13 @@ should include 'size' and option 'dircounts' should be disabled to show this
|
|||||||
size. If the total size of a directory is not calculated, it will be shown as
|
size. If the total size of a directory is not calculated, it will be shown as
|
||||||
'-'.
|
'-'.
|
||||||
|
|
||||||
|
clearmaps
|
||||||
|
|
||||||
|
Remove all keybindings associated with the 'map' command. This command can be
|
||||||
|
used in the config file to remove the default keybindings. For safety purposes,
|
||||||
|
':' is left mapped to the 'read' command, and 'cmap' keybindings are retained so
|
||||||
|
that it is still possible to exit 'lf' using ':quit'.
|
||||||
|
|
||||||
copy (default 'y')
|
copy (default 'y')
|
||||||
|
|
||||||
If there are no selections, save the path of the current file to the copy
|
If there are no selections, save the path of the current file to the copy
|
||||||
|
|||||||
@@ -1614,6 +1614,10 @@ func (e *callExpr) eval(app *app, args []string) {
|
|||||||
app.ui.loadFileInfo(app.nav)
|
app.ui.loadFileInfo(app.nav)
|
||||||
app.nav.sort()
|
app.nav.sort()
|
||||||
app.ui.sort()
|
app.ui.sort()
|
||||||
|
case "clearmaps":
|
||||||
|
// leave `:` and cmaps bound so the user can still exit using `:quit`
|
||||||
|
gOpts.keys = make(map[string]expr)
|
||||||
|
gOpts.keys[":"] = &callExpr{"read", nil, 1}
|
||||||
case "copy":
|
case "copy":
|
||||||
if !app.nav.init {
|
if !app.nav.init {
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ The following commands are provided by lf:
|
|||||||
glob-select
|
glob-select
|
||||||
glob-unselect
|
glob-unselect
|
||||||
calcdirsize
|
calcdirsize
|
||||||
|
clearmaps
|
||||||
copy (default 'y')
|
copy (default 'y')
|
||||||
cut (default 'd')
|
cut (default 'd')
|
||||||
paste (default 'p')
|
paste (default 'p')
|
||||||
@@ -444,6 +445,12 @@ Select/unselect files that match the given glob.
|
|||||||
.PP
|
.PP
|
||||||
Calculate the total size for each of the selected directories. Option 'info' should include 'size' and option 'dircounts' should be disabled to show this size. If the total size of a directory is not calculated, it will be shown as '-'.
|
Calculate the total size for each of the selected directories. Option 'info' should include 'size' and option 'dircounts' should be disabled to show this size. If the total size of a directory is not calculated, it will be shown as '-'.
|
||||||
.PP
|
.PP
|
||||||
|
.EX
|
||||||
|
clearmaps
|
||||||
|
.EE
|
||||||
|
.PP
|
||||||
|
Remove all keybindings associated with the `map` command. This command can be used in the config file to remove the default keybindings. For safety purposes, `:` is left mapped to the `read` command, and `cmap` keybindings are retained so that it is still possible to exit `lf` using `:quit`.
|
||||||
|
.PP
|
||||||
.EX
|
.EX
|
||||||
copy (default 'y')
|
copy (default 'y')
|
||||||
.EE
|
.EE
|
||||||
|
|||||||
Reference in new issue
Block a user