From 39ea1d710d928ec834ae6f0b974c1d98ab7e7ac1 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sat, 23 Mar 2024 14:23:53 +0100 Subject: [PATCH] Vi mode: add "+yy for fish_clipboard_copy and friends Obviously not fully correct, and the implementation is not greate but it's a start. --- share/functions/fish_vi_key_bindings.fish | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/functions/fish_vi_key_bindings.fish b/share/functions/fish_vi_key_bindings.fish index ac72c22c7..f0ebf834b 100644 --- a/share/functions/fish_vi_key_bindings.fish +++ b/share/functions/fish_vi_key_bindings.fish @@ -199,6 +199,9 @@ function fish_vi_key_bindings --description 'vi-like key bindings for fish' bind -s --preset K 'man (commandline -t) 2>/dev/null; or echo -n \a' bind -s --preset yy kill-whole-line yank + for seq in '"*yy' '"*Y' '"+yy' '"+Y' + bind -s --preset $seq fish_clipboard_copy + end bind -s --preset Y kill-whole-line yank bind -s --preset y\$ kill-line yank bind -s --preset y\^ backward-kill-line yank