From bf994977a4d910f0dcd9d9478fcdcf48b7d2f575 Mon Sep 17 00:00:00 2001 From: Patrick Fong Date: Sun, 9 Aug 2020 11:38:27 -0700 Subject: [PATCH 1/5] switch git log to alt+l --- conf.d/fzf.fish | 6 +++--- functions/uninstall.fish | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf.d/fzf.fish b/conf.d/fzf.fish index 51717361..9ca7dcad 100644 --- a/conf.d/fzf.fish +++ b/conf.d/fzf.fish @@ -1,15 +1,15 @@ # 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 Control+f, \el is Alt+l bind \cf '__fzf_search_current_dir' - bind \cl '__fzf_search_git_log' + bind \el '__fzf_search_git_log' bind \cr '__fzf_search_history' bind \cv '__fzf_search_shell_variables' # 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 \el '__fzf_search_git_log' bind --mode insert \cr '__fzf_search_history' bind --mode insert \cv '__fzf_search_shell_variables' end diff --git a/functions/uninstall.fish b/functions/uninstall.fish index 3f56dde1..d07fc77a 100644 --- a/functions/uninstall.fish +++ b/functions/uninstall.fish @@ -1,7 +1,7 @@ #!/usr/bin/env fish if not set --query fzf_fish_custom_keybindings bind --erase --all \cf - bind --erase --all \cl + bind --erase --all \el bind --erase --all \cr bind --erase --all \cv From 4cb3ff09ace2b5d22f7510f8ae46cc1f4336f14a Mon Sep 17 00:00:00 2001 From: Patrick Fong Date: Sat, 15 Aug 2020 10:15:34 -0700 Subject: [PATCH 2/5] use Ctrl+Alt+l for log --- conf.d/fzf.fish | 8 +++++--- functions/uninstall.fish | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/conf.d/fzf.fish b/conf.d/fzf.fish index 9ca7dcad..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 Control+f, \el is Alt+l + # \cf is Ctrl+f bind \cf '__fzf_search_current_dir' - bind \el '__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 \el '__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 d07fc77a..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 \el bind --erase --all \cr bind --erase --all \cv + bind --erase --all \c\el set_color --italics cyan echo "fzf.fish key kindings removed" From 2bec24b45b863a925c2ef881be2fa3d10375dd7d Mon Sep 17 00:00:00 2001 From: Patrick Fong Date: Sat, 15 Aug 2020 10:44:01 -0700 Subject: [PATCH 3/5] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 68bc3a00..a4e4c183 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A plugin that integrates [fzf](https://github.com/junegunn/fzf) into your [fish] > Search for a **file or folder** in the current directory - `Ctrl+f` (f for file) file search -> 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) git log search > Search for a **command** from command history - `Ctrl+r` (r for reverse-i-search) From b809f3af25e70e8a988a04f8d996c147dd8e5b09 Mon Sep 17 00:00:00 2001 From: Patrick Fong Date: Sat, 15 Aug 2020 10:44:50 -0700 Subject: [PATCH 4/5] trying out additional explanation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a4e4c183..6448c4b4 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A plugin that integrates [fzf](https://github.com/junegunn/fzf) into your [fish] > Search for a **file or folder** in the current directory - `Ctrl+f` (f for file) file search -> Search for a **commit** in the current git repository's log - `Ctrl+Alt+l` (l for log) +> Search for a **commit** in the current git repository's log - `Ctrl+Alt+l` (l for log, additional modifier key Alt to prevent conflict with clear screen) git log search > Search for a **command** from command history - `Ctrl+r` (r for reverse-i-search) From 25ca6ddda1e489be2c6594e19734e3f099ef9794 Mon Sep 17 00:00:00 2001 From: Patrick Fong Date: Sat, 15 Aug 2020 10:48:38 -0700 Subject: [PATCH 5/5] shorten --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6448c4b4..27521d9f 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A plugin that integrates [fzf](https://github.com/junegunn/fzf) into your [fish] > Search for a **file or folder** in the current directory - `Ctrl+f` (f for file) file search -> Search for a **commit** in the current git repository's log - `Ctrl+Alt+l` (l for log, additional modifier key Alt to prevent conflict with clear screen) +> 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 > Search for a **command** from command history - `Ctrl+r` (r for reverse-i-search)