Tweak shell keybindings

This commit is contained in:
Nathan McCarty 2023-01-23 15:12:23 -05:00
parent fd3f2c99af
commit f91a148ca7
Signed by: thatonelutenist
GPG Key ID: D70DA3DD4D1E9F96
1 changed files with 25 additions and 0 deletions

View File

@ -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 {
#########################