summaryrefslogtreecommitdiff
path: root/src/config.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.zig')
-rw-r--r--src/config.zig33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/config.zig b/src/config.zig
index 394f9ca3..c4249270 100644
--- a/src/config.zig
+++ b/src/config.zig
@@ -123,6 +123,15 @@ pub const leader_path = std.EnumArray(Builtin, ?[]const u8).init(.{
.Up = "wk",
.Right = "wl",
.Toggleterm = "wt",
+ // the `j` JUMP group, its own letter rather than more of `w`: the window
+ // group moves focus by GEOMETRY (the pane left of this one), these move it
+ // by TIME (the pane I was in before). `o` and `i` are the letters of the
+ // chords that do the same thing, `jj` is the group's obvious verb, and
+ // `jl` is the list itself.
+ .Back = "jo",
+ .Forward = "ji",
+ .Last = "jj",
+ .Jumplist = "jl",
// the two acme verbs: keys and buttons, no leader path — see above
.Look = null,
.Exec = null,
@@ -180,6 +189,29 @@ pub const window_keys = [_]struct { letter: Chord, arrow: Chord, cmd: Builtin }{
pub const new_shell_below: []const Chord = &.{.{ .cp = 'n', .alt = true }};
pub const pane_to_new_column: []const Chord = &.{.{ .cp = 'c', .alt = true }};
+// ---- jumps ----
+
+/// vim's Ctrl-o / Ctrl-i, walking the focus history back and forward. Global
+/// in any mode, like the two Alt- ops above and for the same reason: getting
+/// BACK has to work from inside a pane that owns its keys.
+///
+/// CAREFUL, and this is why the table has a comment: **Ctrl-i is Tab**. On the
+/// wire they are the same byte (0x09), so on a host that speaks only the
+/// legacy encoding this binding never fires and 0x09 keeps meaning `exec_key`
+/// below — which is the right way round, since Tab-executes is the older and
+/// more used of the two. Where the host speaks the kitty keyboard protocol
+/// (`CSI 105;5u`) the two are distinct keys and both work. Shift-Esc
+/// (tty_toggle_alt) is already spelled on that same bet.
+///
+/// Shaped like window_keys: the `cmd` column is what makes the chord
+/// discoverable from the builtin as well as the other way round, and it is
+/// what keeps ONE implementation — pressing the chord and executing the word
+/// `Back` are the same call.
+pub const jump_keys = [_]struct { chord: Chord, cmd: Builtin }{
+ .{ .chord = .{ .cp = 'o', .ctrl = true }, .cmd = .Back },
+ .{ .chord = .{ .cp = 'i', .ctrl = true }, .cmd = .Forward },
+};
+
/// `j` off the topbar drops back onto a tagline — the mirror of the `k` that
/// got you there (window_keys' letter, answered by tagNormalKey).
pub const topbar_down: []const Chord = &.{.{ .cp = 'j' }};
@@ -368,6 +400,7 @@ pub const symbol_marker = " WsSymbols /";
/// these changes only what you read in a tag.
pub const search_buffer = "+Search";
pub const help_buffer = "+Help";
+pub const jumps_buffer = "+Jumps";
pub const hover_buffer = "+Hover";
pub const lsp_buffer = "+Lsp";