fish: move bindings to config.fish

This commit is contained in:
Charles Gould 2022-02-16 09:58:13 -05:00
parent 9109b19854
commit 1ffb952480
3 changed files with 14 additions and 17 deletions

View File

@ -38,6 +38,20 @@ if status --is-interactive
set -g __fish_git_prompt_color_stashstate cyan set -g __fish_git_prompt_color_stashstate cyan
set -g __fish_git_prompt_color_untrackedfiles cyan set -g __fish_git_prompt_color_untrackedfiles cyan
set -g __fish_git_prompt_color_upstream yellow 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 end
if not set -q __universals_initialized if not set -q __universals_initialized

View File

@ -12,6 +12,5 @@ function battery --description "Print battery status"
end end
# Repaint is needed since there is a keybinding for this function # Repaint is needed since there is a keybinding for this function
# See fish_user_key_bindings.fish
commandline -f repaint commandline -f repaint
end end

View File

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