From b35efa261a638c4b7c858c242e95cad3aa0da16d Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Fri, 29 Nov 2024 04:31:49 +0000 Subject: [PATCH] Add fzf and readline vi mode --- home-manager/modules/programs/shell.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/home-manager/modules/programs/shell.nix b/home-manager/modules/programs/shell.nix index f82828e..b42461e 100644 --- a/home-manager/modules/programs/shell.nix +++ b/home-manager/modules/programs/shell.nix @@ -42,4 +42,27 @@ style = "header,rule,snip,changes"; }; }; + + programs.readline = { + enable = true; + extraConfig = '' + set editing-mode vi + set show-all-if-ambiguous on + set editing-mode vi + + set keymap vi-command + # these are for vi-command mode + "\e[A": history-search-backward + "\e[B": history-search-forward + j: history-search-forward + k: history-search-backward + set keymap vi-insert + # these are for vi-insert mode + "\e[A": history-search-backward + "\e[B": history-search-forward + ''; + }; + + programs.fzf.enable = true; + }