From 8cca6bfd39f8d4f5e944d1840a4b1c21b293e61b Mon Sep 17 00:00:00 2001 From: Noah Masur Date: Wed, 7 Apr 2021 08:38:43 -0400 Subject: [PATCH] cmd O to edit in vim with fzf --- alacritty.configlink/alacritty.yml | 3 ++- fish.configlink/functions/edit.fish | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 fish.configlink/functions/edit.fish diff --git a/alacritty.configlink/alacritty.yml b/alacritty.configlink/alacritty.yml index b8c4536..247502c 100644 --- a/alacritty.configlink/alacritty.yml +++ b/alacritty.configlink/alacritty.yml @@ -591,7 +591,8 @@ shell: key_bindings: - { key: F, mods: Super, action: ToggleSimpleFullscreen } - { key: A, mods: Super, chars: "\x02" } # CMD-A sends CTRL-B for tmux - - { key: O, mods: Super, chars: "\x14" } # CMD-O sends CTRL-T for fzf + - { key: D, mods: Super, chars: "\x14" } # CMD-D sends CTRL-T for fzf + - { key: O, mods: Super, chars: "edit\x0D" } # CMD-O opens file in vim - { key: A, mods: Alt, chars: "\x1ba" } - { key: B, mods: Alt, chars: "\x1bb" } diff --git a/fish.configlink/functions/edit.fish b/fish.configlink/functions/edit.fish new file mode 100644 index 0000000..732e15e --- /dev/null +++ b/fish.configlink/functions/edit.fish @@ -0,0 +1,5 @@ +function edit --description "Open a file in Vim" + set vimfile (fzf) + and vim $vimfile +end +