xplr is a modal file explorer. That means the users switch between different modes, each containing a different set of key bindings to avoid clashes. Users can switch between these modes at run-time.
The modes can be configured using the xplr.config.modes
Lua API.
xplr.config.modes.builtin
contain some built-in modes which can be
overridden, but you can't add or remove modes in it.
The builtin default mode. Visit the Default Key Bindings to see what each mode does.
Type: Mode
The builtin debug error mode.
Type: Mode
The builtin recover mode.
Type: Mode
The builtin go to path mode.
Type: Mode
The builtin move_to mode.
Type: Mode
The builtin copy_to mode.
Type: Mode
The builtin selection ops mode.
Type: Mode
The builtin create mode.
Type: Mode
The builtin create directory mode.
Type: Mode
The builtin create file mode.
Type: Mode
The builtin number mode.
Type: Mode
The builtin go to mode.
Type: Mode
The builtin rename mode.
Type: Mode
The builtin duplicate as mode.
Type: Mode
The builtin delete mode.
Type: Mode
The builtin action mode.
Type: Mode
The builtin quit mode.
Type: Mode
The builtin search mode.
Type: Mode
The builtin filter mode.
Type: Mode
The builtin relative_path_does_match_regex mode.
Type: Mode
The builtin relative_path_does_not_match_regex mode.
Type: Mode
The builtin sort mode.
Type: Mode
The builtin switch layout mode.
Type: Mode
The builtin vroot mode.
Type: Mode
The builtin edit permissions mode.
Type: Mode
This is where you define custom modes.
Type: mapping of the following key-value pairs:
- key: string
- value: Mode
Example:
xplr.config.modes.custom.example = {
name = "example",
key_bindings = {
on_key = {
enter = {
help = "default mode",
messages = {
"PopMode",
{ SwitchModeBuiltin = "default" },
},
},
},
},
}
xplr.config.general.initial_mode = "example"