summaryrefslogtreecommitdiff
path: root/src/config.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.zig')
-rw-r--r--src/config.zig42
1 files changed, 40 insertions, 2 deletions
diff --git a/src/config.zig b/src/config.zig
index 189d6a0e..d6d6813d 100644
--- a/src/config.zig
+++ b/src/config.zig
@@ -109,6 +109,20 @@ pub const leader_path = paths: {
.Lspwhy = "lw",
.Del = "d",
.Kill = "k",
+ // THE CLIPBOARD MENU, on helix's own five letters and nowhere else.
+ // These are the only paths in the table that keep their helix spelling
+ // unprefixed, and they can: `y` `Y` `p` `P` `R` were free at the top
+ // level, and moving them into a group would have made the one thing
+ // here that IS helix's leader stop looking like it.
+ //
+ // Bare `y`/`p`/`P`/`R` remain the DEFAULT register — that split is the
+ // whole design (see builtins.zig's clipboard section), and it is why
+ // an ordinary delete no longer reaches past the editor.
+ .ClipYank = "y",
+ .ClipYankMain = "Y",
+ .ClipPaste = "p",
+ .ClipPasteBefore = "P",
+ .ClipReplace = "R",
// the `f` file group (spacemacs): Save left vim's `w` to join Find and
// New here, which frees `w` for the window group (SPC w h/j/k/l).
.Save = "fs",
@@ -282,6 +296,27 @@ pub const tty_toggle_default: u21 = 'b';
/// means what Escape always means.
pub const tty_toggle_alt: []const Chord = &.{.{ .cp = Key.escape, .shift = true }};
+/// What LEAVING raw tty mode hides on the shell's prompt rows.
+///
+/// A prompt is CHROME. `user@host ~/src $` is redrawn on every keystroke, says
+/// nothing a second time, and is never what you want to select, look at or
+/// edit — so blanking it is most of what turns a scrollback into a readable
+/// document, and pardes has always done it (OSC 133 is how it knows).
+///
+/// What it USED to take with it was the command you had typed at that prompt,
+/// because the two share a grid row and the row was the unit. That command is
+/// content: the one thing on the row worth keeping, and the thing you reach
+/// for `b` to get at in the first place. OSC 133 marks the two separately —
+/// per CELL, not just per row — so `.prompt` blanks the prompt's own cells and
+/// leaves the input sitting in the COLUMNS it really occupies. Those columns
+/// are not cosmetic: clicking the command in normal mode and pressing the
+/// toggle carries the click into the shell's own cursor (promptClickMove),
+/// which counts them.
+///
+/// `.prompt_and_input` is the older behaviour, kept for anyone who wants a
+/// terminal to read as output and nothing else.
+pub const tty_blank: enum { prompt, prompt_and_input } = .prompt;
+
// ---- the tag line and the topbar ----
// The topbar is a HAND-PICKED subset in a fixed order, not a derivation: row 0
@@ -801,14 +836,17 @@ pub const select_regex: []const Chord = &.{.{ .cp = 's' }};
pub const split_regex: []const Chord = &.{.{ .cp = 'S' }};
// ---- edits ----
+//
+// Every one of these reads or writes the DEFAULT register and only that.
+// The system clipboard is five separate words on `SPC y Y p P R`, which is
+// helix's split and the reason `d` cannot silently eat what you copied out of
+// a browser. See leader_path above and builtins.zig's clipboard section.
pub const delete: []const Chord = &.{.{ .cp = 'd' }};
pub const delete_noyank: []const Chord = &.{.{ .cp = 'd', .alt = true }};
pub const change: []const Chord = &.{.{ .cp = 'c' }};
pub const yank: []const Chord = &.{.{ .cp = 'y' }};
pub const replace_with_yank: []const Chord = &.{.{ .cp = 'R' }};
-/// helix: the DEFAULT register, not the system clipboard — most terminals
-/// refuse the OSC 52 read, so a round trip would never come back
pub const paste_after: []const Chord = &.{.{ .cp = 'p' }};
pub const paste_before: []const Chord = &.{.{ .cp = 'P' }};
pub const switch_case: []const Chord = &.{.{ .cp = '~' }};