Skip to content

Commit

Permalink
Use fzf_uninstall event to erase bindings (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgebucaran authored Nov 17, 2020
1 parent 86c71ad commit 33538d9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
16 changes: 16 additions & 0 deletions conf.d/fzf.fish
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,19 @@ if not set --query FZF_DEFAULT_OPTS
# preview-window wrap wraps long lines in the preview window, making reading easier
set --export FZF_DEFAULT_OPTS '--cycle --layout=reverse --border --height 90% --preview-window=wrap'
end

function _fzf_uninstall --on-event fzf_uninstall
# Not going to erase FZF_DEFAULT_OPTS because too hard to tell if it was set by the user or by this plugin
if not set --query fzf_fish_custom_keybindings
bind --erase --all \cf
bind --erase --all \cr
bind --erase --all \cv
bind --erase --all \e\cl
bind --erase --all \e\cs

set_color --italics cyan
echo "fzf.fish key bindings removed"
set_color normal
end
functions --erase _fzf_uninstall
end
14 changes: 0 additions & 14 deletions functions/uninstall.fish

This file was deleted.

0 comments on commit 33538d9

Please sign in to comment.