From 122da8910d053eb1c963161a68cf9aac61d8c893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Fri, 13 Oct 2023 14:41:42 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(fish):=20vim=20mode=20enabled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/fish/config.fish | 2 -- .../fish/functions/fish_user_key_bindings.fish | 17 +++++++++++++++++ .config/fish/keybinds.fish | 9 --------- 3 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 .config/fish/functions/fish_user_key_bindings.fish delete mode 100644 .config/fish/keybinds.fish diff --git a/.config/fish/config.fish b/.config/fish/config.fish index fe6c0da0..3ce4410c 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -1,5 +1,4 @@ source ~/.config/fish/variables.fish -source ~/.config/fish/keybinds.fish source ~/.config/fish/abbreviations.fish if status is-interactive @@ -12,4 +11,3 @@ starship init fish | source zoxide init fish | source alias cd='z' # Couldn't create it as a function because of zoxide init - diff --git a/.config/fish/functions/fish_user_key_bindings.fish b/.config/fish/functions/fish_user_key_bindings.fish new file mode 100644 index 00000000..0e27b9d7 --- /dev/null +++ b/.config/fish/functions/fish_user_key_bindings.fish @@ -0,0 +1,17 @@ +function fish_user_key_bindings + set -xg fish_key_bindings fish_vi_key_bindings + fish_default_key_bindings -M insert + fish_vi_key_bindings --no-erase insert + bind -M visual -m default y 'fish_clipboard_copy; commandline -f end-selection repaint-mode' + bind yy fish_clipboard_copy + bind p fish_clipboard_paste + fzf_configure_bindings --directory=\e\cf + fzf_configure_bindings --history=\ch + + bind \e\cg fgit + bind \e\cw rga-fzf + bind \e\z cdzi + bind \e\ci navi + bind \e\cr repos + bind \e\[Z switch_kitty_tab +end diff --git a/.config/fish/keybinds.fish b/.config/fish/keybinds.fish deleted file mode 100644 index 4e68e474..00000000 --- a/.config/fish/keybinds.fish +++ /dev/null @@ -1,9 +0,0 @@ -fzf_configure_bindings --directory=\e\cf -fzf_configure_bindings --history=\ch - -bind \e\cg fgit -bind \e\cw rga-fzf -bind \e\z cdzi -bind \e\ci navi -bind \e\cr repos -bind \e\[Z switch_kitty_tab