Tweak shell keybindings
This commit is contained in:
parent
fd3f2c99af
commit
f91a148ca7
|
@ -229,6 +229,8 @@ with lib; {
|
||||||
any-nix-shell fish --info-right | source
|
any-nix-shell fish --info-right | source
|
||||||
# Load logger function
|
# Load logger function
|
||||||
source ~/.config/fish/functions/cmdlogger.fish
|
source ~/.config/fish/functions/cmdlogger.fish
|
||||||
|
# Load up vi keybindings
|
||||||
|
fish_vi_key_bindings
|
||||||
'';
|
'';
|
||||||
functions = {
|
functions = {
|
||||||
# Setup command logging to ~/.logs
|
# Setup command logging to ~/.logs
|
||||||
|
@ -267,6 +269,29 @@ with lib; {
|
||||||
style = "header,rule,snip,changes";
|
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 {
|
(mkIf config.nathan.programs.util.json {
|
||||||
#########################
|
#########################
|
||||||
|
|
Loading…
Reference in New Issue