fish vi mode
This commit is contained in:
parent
246f418b99
commit
83e8a34123
1 changed files with 18 additions and 1 deletions
19
home.nix
19
home.nix
|
@ -74,7 +74,24 @@
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
set fish_greeting
|
set -U fish_greeting
|
||||||
|
|
||||||
|
if status is-interactive
|
||||||
|
# Commands to run in interactive sessions can go here
|
||||||
|
end
|
||||||
|
|
||||||
|
function fish_user_key_bindings
|
||||||
|
# Execute this once per mode that emacs bindings should be used in
|
||||||
|
fish_default_key_bindings -M insert
|
||||||
|
|
||||||
|
# Then execute the vi-bindings so they take precedence when there's a conflict.
|
||||||
|
# Without --no-erase fish_vi_key_bindings will default to
|
||||||
|
# resetting all bindings.
|
||||||
|
# The argument specifies the initial mode (insert, "default" or visual).
|
||||||
|
fish_vi_key_bindings --no-erase insert
|
||||||
|
|
||||||
|
bind \cf 'fg 2>/dev/null; commandline -f repaint'
|
||||||
|
end
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue