mirror of
https://github.com/sayanarijit/xplr
synced 2024-11-16 12:13:09 +00:00
deploy: bea0f277bc
This commit is contained in:
parent
8b65bd67dd
commit
88dbd677da
@ -155,51 +155,62 @@
|
||||
<p>If you need help debugging or understanding key bindings DYI way, you can
|
||||
create a <code>test.lua</code> file with the following script, launch xplr with
|
||||
<code>xplr --extra-config test.lua</code>, press <code>#</code> and play around.</p>
|
||||
<pre><code class="language-lua">xplr.config.modes.builtin.default.key_bindings.on_key["#"] = {
|
||||
help = "test",
|
||||
messages = {
|
||||
"PopMode",
|
||||
{ SwitchModeCustom = "test" },
|
||||
},
|
||||
}
|
||||
|
||||
xplr.config.modes.custom.test = {
|
||||
name = "test",
|
||||
key_bindings = {
|
||||
<pre><code class="language-lua">-- The global key bindings inherited by all the modes.
|
||||
xplr.config.general.global_key_bindings = {
|
||||
on_key = {
|
||||
["1"] = {
|
||||
messages = {
|
||||
{ LogInfo = "on_key called" },
|
||||
},
|
||||
},
|
||||
a = {
|
||||
messages = {
|
||||
{ LogInfo = "on_key called" },
|
||||
},
|
||||
},
|
||||
["`"] = {
|
||||
messages = {
|
||||
{ LogInfo = "on_key called" },
|
||||
},
|
||||
},
|
||||
tab = {
|
||||
messages = {
|
||||
{ LogInfo = "on_key called" },
|
||||
},
|
||||
},
|
||||
esc = {
|
||||
help = "escape",
|
||||
messages = {
|
||||
{ LogInfo = "global on_key(esc) called" },
|
||||
"PopMode",
|
||||
},
|
||||
},
|
||||
["ctrl-c"] = {
|
||||
help = "terminate",
|
||||
messages = {
|
||||
"Terminate",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Press `#` to enter the `debug key bindings` mode.
|
||||
xplr.config.modes.builtin.default.key_bindings.on_key["#"] = {
|
||||
help = "test",
|
||||
messages = {
|
||||
"PopMode",
|
||||
{ SwitchModeCustom = "debug_key_bindings" },
|
||||
},
|
||||
}
|
||||
|
||||
-- The `debug key bindings` mode.
|
||||
xplr.config.modes.custom.debug_key_bindings = {
|
||||
name = "debug key bindings",
|
||||
key_bindings = {
|
||||
on_key = {
|
||||
["1"] = {
|
||||
messages = {
|
||||
{ LogInfo = "on_key(1) called" },
|
||||
},
|
||||
},
|
||||
a = {
|
||||
messages = {
|
||||
{ LogInfo = "on_key(a) called" },
|
||||
},
|
||||
},
|
||||
["`"] = {
|
||||
messages = {
|
||||
{ LogInfo = "on_key(`) called" },
|
||||
},
|
||||
},
|
||||
tab = {
|
||||
messages = {
|
||||
{ LogInfo = "on_key(tab) called" },
|
||||
},
|
||||
},
|
||||
f1 = {
|
||||
messages = {
|
||||
{ LogInfo = "on_key called" },
|
||||
{ LogInfo = "on_key(f1) called" },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -459,6 +459,10 @@ Defines where to show borders for the selection panel.</p>
|
||||
<p>Set it to a file path to start fifo when xplr loads.
|
||||
Generally it is used to integrate with external tools like previewers.</p>
|
||||
<p>Type: nullable string</p>
|
||||
<h4 id="xplrconfiggeneralglobal_key_bindings"><a class="header" href="#xplrconfiggeneralglobal_key_bindings">xplr.config.general.global_key_bindings</a></h4>
|
||||
<p>Use it to define a set of key bindings that are available by default in
|
||||
every <a href="https://xplr.dev/en/mode">mode</a>. They can be overwritten.</p>
|
||||
<p>Type: <a href="https://xplr.dev/en/configure-key-bindings#key-bindings">Key Bindings</a></p>
|
||||
|
||||
</main>
|
||||
|
||||
|
@ -781,6 +781,10 @@ Defines where to show borders for the selection panel.</p>
|
||||
<p>Set it to a file path to start fifo when xplr loads.
|
||||
Generally it is used to integrate with external tools like previewers.</p>
|
||||
<p>Type: nullable string</p>
|
||||
<h4 id="xplrconfiggeneralglobal_key_bindings"><a class="header" href="#xplrconfiggeneralglobal_key_bindings">xplr.config.general.global_key_bindings</a></h4>
|
||||
<p>Use it to define a set of key bindings that are available by default in
|
||||
every <a href="https://xplr.dev/en/mode">mode</a>. They can be overwritten.</p>
|
||||
<p>Type: <a href="https://xplr.dev/en/configure-key-bindings#key-bindings">Key Bindings</a></p>
|
||||
<div style="break-before: page; page-break-before: always;"></div><h3 id="node-types"><a class="header" href="#node-types">Node Types</a></h3>
|
||||
<p>This section defines how to deal with different kinds of nodes (files,
|
||||
directories, symlinks etc.) based on their properties.</p>
|
||||
@ -1409,51 +1413,62 @@ of <a href="modes.html">modes</a> and the key mappings for each mode.</p>
|
||||
<p>If you need help debugging or understanding key bindings DYI way, you can
|
||||
create a <code>test.lua</code> file with the following script, launch xplr with
|
||||
<code>xplr --extra-config test.lua</code>, press <code>#</code> and play around.</p>
|
||||
<pre><code class="language-lua">xplr.config.modes.builtin.default.key_bindings.on_key["#"] = {
|
||||
help = "test",
|
||||
messages = {
|
||||
"PopMode",
|
||||
{ SwitchModeCustom = "test" },
|
||||
},
|
||||
}
|
||||
|
||||
xplr.config.modes.custom.test = {
|
||||
name = "test",
|
||||
key_bindings = {
|
||||
<pre><code class="language-lua">-- The global key bindings inherited by all the modes.
|
||||
xplr.config.general.global_key_bindings = {
|
||||
on_key = {
|
||||
["1"] = {
|
||||
messages = {
|
||||
{ LogInfo = "on_key called" },
|
||||
},
|
||||
},
|
||||
a = {
|
||||
messages = {
|
||||
{ LogInfo = "on_key called" },
|
||||
},
|
||||
},
|
||||
["`"] = {
|
||||
messages = {
|
||||
{ LogInfo = "on_key called" },
|
||||
},
|
||||
},
|
||||
tab = {
|
||||
messages = {
|
||||
{ LogInfo = "on_key called" },
|
||||
},
|
||||
},
|
||||
esc = {
|
||||
help = "escape",
|
||||
messages = {
|
||||
{ LogInfo = "global on_key(esc) called" },
|
||||
"PopMode",
|
||||
},
|
||||
},
|
||||
["ctrl-c"] = {
|
||||
help = "terminate",
|
||||
messages = {
|
||||
"Terminate",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Press `#` to enter the `debug key bindings` mode.
|
||||
xplr.config.modes.builtin.default.key_bindings.on_key["#"] = {
|
||||
help = "test",
|
||||
messages = {
|
||||
"PopMode",
|
||||
{ SwitchModeCustom = "debug_key_bindings" },
|
||||
},
|
||||
}
|
||||
|
||||
-- The `debug key bindings` mode.
|
||||
xplr.config.modes.custom.debug_key_bindings = {
|
||||
name = "debug key bindings",
|
||||
key_bindings = {
|
||||
on_key = {
|
||||
["1"] = {
|
||||
messages = {
|
||||
{ LogInfo = "on_key(1) called" },
|
||||
},
|
||||
},
|
||||
a = {
|
||||
messages = {
|
||||
{ LogInfo = "on_key(a) called" },
|
||||
},
|
||||
},
|
||||
["`"] = {
|
||||
messages = {
|
||||
{ LogInfo = "on_key(`) called" },
|
||||
},
|
||||
},
|
||||
tab = {
|
||||
messages = {
|
||||
{ LogInfo = "on_key(tab) called" },
|
||||
},
|
||||
},
|
||||
f1 = {
|
||||
messages = {
|
||||
{ LogInfo = "on_key called" },
|
||||
{ LogInfo = "on_key(f1) called" },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user