diff --git a/README.md b/README.md index 2a0dab68..92ab447e 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A plugin that integrates [fzf](https://github.com/junegunn/fzf) into your [fish] ![file search](/images/file_search.png) -> Search for a **commit** in the current git repository's log - `Ctrl+l` (l for log) +> Search for a **commit** in the current git repository's log - `Ctrl+Alt+l` (l for log, Alt to prevent overriding clear screen) ![git log search](/images/git_log_search.png) diff --git a/conf.d/fzf.fish b/conf.d/fzf.fish index 51717361..6c971550 100644 --- a/conf.d/fzf.fish +++ b/conf.d/fzf.fish @@ -1,17 +1,19 @@ # Set up the default, mnemonic keybindings unless the user has chosen to customize them if not set --query fzf_fish_custom_keybindings - # \cf is ctrl+f, etc. + # \cf is Ctrl+f bind \cf '__fzf_search_current_dir' - bind \cl '__fzf_search_git_log' bind \cr '__fzf_search_history' bind \cv '__fzf_search_shell_variables' + # __fzf_search_git_log's keybinding has Alt as an additional modifier key to avoid conflict with + # clear screen (Ctrl+l) and __fish_list_current_token (Alt+l) + bind \e\cl '__fzf_search_git_log' # set up the same keybindings for insert mode if using fish_vi_key_bindings if [ $fish_key_bindings = 'fish_vi_key_bindings' ] bind --mode insert \cf '__fzf_search_current_dir' - bind --mode insert \cl '__fzf_search_git_log' bind --mode insert \cr '__fzf_search_history' bind --mode insert \cv '__fzf_search_shell_variables' + bind --mode insert \e\cl '__fzf_search_git_log' end end diff --git a/functions/uninstall.fish b/functions/uninstall.fish index 3f56dde1..554cef95 100644 --- a/functions/uninstall.fish +++ b/functions/uninstall.fish @@ -1,9 +1,9 @@ #!/usr/bin/env fish if not set --query fzf_fish_custom_keybindings bind --erase --all \cf - bind --erase --all \cl bind --erase --all \cr bind --erase --all \cv + bind --erase --all \c\el set_color --italics cyan echo "fzf.fish key kindings removed"