diff --git a/home-manager/common/programs/core.nix b/home-manager/common/programs/core.nix index 3cdafc9..838c45b 100644 --- a/home-manager/common/programs/core.nix +++ b/home-manager/common/programs/core.nix @@ -229,6 +229,8 @@ with lib; { any-nix-shell fish --info-right | source # Load logger function source ~/.config/fish/functions/cmdlogger.fish + # Load up vi keybindings + fish_vi_key_bindings ''; functions = { # Setup command logging to ~/.logs @@ -267,6 +269,29 @@ with lib; { style = "header,rule,snip,changes"; }; }; + ######################### + ## Readline + fzf and other quality of life stuff + ######################### + 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; }; }) (mkIf config.nathan.programs.util.json { #########################