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.
This commit is contained in:
Johannes Altmanninger 2024-03-23 14:23:53 +01:00
parent 25db4e803c
commit 39ea1d710d

View File

@ -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