From 1ffb952480beffaeaa3bcb7c02682af0648c9d36 Mon Sep 17 00:00:00 2001 From: Charles Gould Date: Wed, 16 Feb 2022 09:58:13 -0500 Subject: [PATCH] fish: move bindings to config.fish --- fish/config.fish | 14 ++++++++++++++ fish/functions/battery.fish | 1 - fish/functions/fish_user_key_bindings.fish | 16 ---------------- 3 files changed, 14 insertions(+), 17 deletions(-) delete mode 100644 fish/functions/fish_user_key_bindings.fish diff --git a/fish/config.fish b/fish/config.fish index 5401df6..4952b4a 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -38,6 +38,20 @@ if status --is-interactive set -g __fish_git_prompt_color_stashstate cyan set -g __fish_git_prompt_color_untrackedfiles cyan set -g __fish_git_prompt_color_upstream yellow + + # Bindings + bind \cb battery + bind \cq fkill + bind \cp __fzf_files + bind \cg __fzf_git_log + bind \cr __fzf_history + + # By default, Ctrl+L clears the screen + # Add binding Ctrl+Alt+L to clear screen AND scrollback buffer + bind \e\f 'clear; commandline -f repaint' + + # Expand '...' to '../..' + bind . expand_dots end if not set -q __universals_initialized diff --git a/fish/functions/battery.fish b/fish/functions/battery.fish index 4c1af59..882c06f 100644 --- a/fish/functions/battery.fish +++ b/fish/functions/battery.fish @@ -12,6 +12,5 @@ function battery --description "Print battery status" end # Repaint is needed since there is a keybinding for this function - # See fish_user_key_bindings.fish commandline -f repaint end diff --git a/fish/functions/fish_user_key_bindings.fish b/fish/functions/fish_user_key_bindings.fish deleted file mode 100644 index 66d8c9a..0000000 --- a/fish/functions/fish_user_key_bindings.fish +++ /dev/null @@ -1,16 +0,0 @@ -function fish_user_key_bindings - bind \cb battery - bind \cq fkill - - # By default, Ctrl+L clears the screen - # Add binding Ctrl+Alt+L to clear screen AND scrollback buffer - bind \e\f 'clear; commandline -f repaint' - - # Bindings for fzf - bind \cp __fzf_files - bind \cg __fzf_git_log - bind \cr __fzf_history - - # Expand '...' to '../..' - bind . expand_dots -end