From 3b7a1191514a59c9a26e638afe66e2d4f5af589b Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 3 Jan 2026 11:17:57 +0000 Subject: [PATCH] home: pager: add readline mappings Found a nice tip to emulate deletion to start/end of line. --- modules/home/pager/default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/home/pager/default.nix b/modules/home/pager/default.nix index 99ed3ac..0f58d12 100644 --- a/modules/home/pager/default.nix +++ b/modules/home/pager/default.nix @@ -16,6 +16,22 @@ in #command # Quit without clearing the screen on `Q` Q toggle-option -!^Predraw-on-quit\nq + + #line-edit + # readline-style command editing + ^p up + ^n down + ^b left + ^f right + ^a home + ^e end + \eb word-left + \ef word-right + ^w word-backspace + \ed word-delete + # Simulate delete to start/end of line by repeating word-wise actions + ^u word-backspace ${lib.strings.replicate 100 "^w"} + ^k word-delete ${lib.strings.replicate 100 "\\ed"} ''; };