Skip to content

Enable yank-last-arg for Vi binding #1905

Open

Description

@amitkot

yank-last-arg was enabled for Emacs binding as part of #343.
It would be very useful to have it enabled for Vi binding as well.

I'm using Xonsh and as a workaround for the time being I am using this binding:

@events.on_ptk_create
def custom_keybindings(bindings, **kw):

    @bindings.add('escape', '.')
    def yank_last(event):
        event.current_buffer.yank_last_arg()

Activity

  1. leo7martins commented on Nov 21, 2026

    @leo7martins

    PR #2178 implements this by binding the existing yank-last-arg named command to Meta-'.' and Meta-'_' in Vi insert mode - the same sequences used on the Emacs side, and the default readline vi-insert binding (the workaround from the issue is essentially this, registered upstream). Tests included; full suite passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions