invert-below command to substitute for visual mode (#1101)
This command inverts the selection for the current file and all the files below it. Using this command twice substitutes for having a "visual" mode. This is described in more detail in the docs and in https://github.com/gokcehan/lf/issues/477#issuecomment-1414563834. Fixes #477. While that's not exactly what was asked for, I hope it's a suitable replacement and seems more in the spirit of `lf`, at least until a better replacement is implemented.
This commit is contained in:
1 parent
752f059068
commit
b02fd42df4
6 files changed
+54
-2
No files matched your search
@@ -36,6 +36,7 @@ The following commands are provided by lf:
|
||||
low (default 'L')
|
||||
toggle
|
||||
invert (default 'v')
|
||||
invert-below
|
||||
unselect (default 'u')
|
||||
glob-select
|
||||
glob-unselect
|
||||
@@ -337,6 +338,17 @@ Reverse the selection of all files in the current directory (i.e. 'toggle' all f
|
||||
Selections in other directories are not effected by this command.
|
||||
You can define a new command to select all files in the directory by combining 'invert' with 'unselect' (i.e. 'cmd select-all :unselect; invert'), though this will also remove selections in other directories.
|
||||
|
||||
invert-below
|
||||
|
||||
Reverse the selection (i.e. 'toggle') of all files at or after the current file in the current directory.
|
||||
|
||||
To select a contiguous block of files, use this command on the first file you want to select.
|
||||
Then, move down to the first file you do *not* want to select (the one after the end of the desired selection) and use this command again.
|
||||
This achieves an effect similar to the visual mode in vim.
|
||||
|
||||
This command is experimental and may be removed once a better replacement for the visual mode is implemented in 'lf'.
|
||||
If you'd like to experiment with using this command, you should bind it to a key (e.g. 'V') for a better experience.
|
||||
|
||||
unselect (default 'u')
|
||||
|
||||
Remove the selection of all files in all directories.
|
||||
|
||||
Reference in new issue
Block a user