I've just started using fish and I'm loving using the vi keybindings it provides.
I wanted though to add a custom keymap that I use in vi. I usually map space+c
in visual mode to yank to "*
(system clipboard). How can I add such keymap in fish?
I'm using fish 3.3.1 on MacOS 12.
Edit: I've tried this
bind -M visual \x20c '"*y'
And got the following error
fish: Unexpected end of string, quotes are not balanced
Also tried with a modifier instead of space and got the same result.
bind -M visual \20c fish_clipboard_copy
? It's not working for me, but I'm on WSL, where the clipboard operates quite differently. If it works, then I'll add it as an answer. If not, we'll keep working on it :-)