From 302f83b23b364b08dc47725266db5e20437d71e4 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Sat, 18 Jul 2026 00:30:32 +0530 Subject: feat(neomutt): add vim-style delete/copy keybindings, gf/gF swap, and private configs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add `dd`/`D` delete keybindings (single/thread) with vim-style `d` as prefix - Extend copy (`y`/`yy`) to work in both index and pager views - Add `gT` for previous-unread-mailbox (counterpart to `gt`) - Swap `gf`/`gF` so `gf` limits and `gF` clears filter (via macro) - Fix `binds` → `macros` in macros.nix and add `description` fields - Add `ZQ` (quit without saving) macro alongside existing `ZZ` - Add private email.nix and git.nix with personal account/identity config --- modules/communication/neomutt/macros.nix | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'modules/communication/neomutt/macros.nix') diff --git a/modules/communication/neomutt/macros.nix b/modules/communication/neomutt/macros.nix index ae1d84e..e65436c 100644 --- a/modules/communication/neomutt/macros.nix +++ b/modules/communication/neomutt/macros.nix @@ -1,8 +1,7 @@ # Macros - neomutt macros for sync, URL extraction, flag legend, and quit { config, lib, ... }: - { - config.programs.neomutt.binds = lib.mkIf config.communication.neomutt.enable [ + config.programs.neomutt.macros = lib.mkIf config.communication.neomutt.enable [ { map = [ "index" @@ -10,6 +9,7 @@ ]; key = "O"; action = "set my_wait_key=$wait_key wait_key=no${lib.getExe config.scripts.neomutt-sync.package}set wait_key=$my_wait_key"; + description = "sync mailbox (run neomutt-sync)"; } { # gx: extract links from the current message and open one, vim-netrw style @@ -19,6 +19,7 @@ ]; key = "gx"; action = "urlscan"; + description = "extract links from message (netrw-style)"; } { map = [ @@ -27,12 +28,29 @@ ]; key = "gl"; action = "less ~/.config/neomutt/flag_legend.txt"; + description = "show flag legend"; + } + { + # gF: clear the current limit/filter and show every message again, + # the counterpart to gf (interactive limit prompt) in binds.nix + map = [ "index" ]; + key = "gF"; + action = "~A"; + description = "clear limit/filter, show all messages"; } { # ZZ: save and quit, vim-style (sync mailbox, then quit) map = [ "index" ]; key = "ZZ"; action = ""; + description = "save changes and quit"; + } + { + # ZQ: quit without saving, vim-style counterpart to ZZ + map = [ "index" ]; + key = "ZQ"; + action = ""; + description = "quit without saving"; } ]; } -- cgit v1.2.3