Skip to content

Vim "*p binding is broken, mixes input functions and fishscript together #8186

@lilyball

Description

@lilyball

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions