fish 3.3.1
The Vim "*p binding is completely broken as it mixes input functions and fishscript together:
bind --preset '"*p' forward-char 'commandline -i ( xsel -p; echo )[1]'
Because of this, attempting to invoke this binding does nothing at all. (Side note: I'm surprised this doesn't print any errors)
Even if this worked, it would be the wrong behavior at the end of a line. Vim's behavior when virtualedit=onemore (which is what fish is doing) is for p to keep the cursor on the current line. So really we need some fishscript function that inspects the character after the cursor to determine if it's a newline, if not then advances by one char, otherwise does nothing. Then we can use that in this binding instead of forward-char.
fish 3.3.1
The Vim
"*pbinding is completely broken as it mixes input functions and fishscript together:Because of this, attempting to invoke this binding does nothing at all. (Side note: I'm surprised this doesn't print any errors)
Even if this worked, it would be the wrong behavior at the end of a line. Vim's behavior when
virtualedit=onemore(which is what fish is doing) is forpto keep the cursor on the current line. So really we need some fishscript function that inspects the character after the cursor to determine if it's a newline, if not then advances by one char, otherwise does nothing. Then we can use that in this binding instead offorward-char.