[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How should 'vi-yank-pop' be used?

From: Matteo Paolini
Subject: How should 'vi-yank-pop' be used?
Date: Sat, 27 Aug 2022 20:38:13 +0200

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: msys
Compiler: gcc
Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -D_STATIC_BUILD
uname output: MINGW64_NT-10.0-19044 Eulero 3.3.5-341.x86_64 2022-07-08
09:41 UTC x86_64 Msys
Machine Type: x86_64-pc-msys

Bash Version: 5.1
Patch Level: 16
Release Status: release

I recently discovered Readline's 'yank-pop' and 'vi-yank-pop' commands.
>From what I understand, 'yank-pop' is supposed to cycle through Bash's
internal kill-ring
after yanking the most recent killed text.
The command works as expected in Emacs mode, but trying to use its
counterpart in vi mode seems to just return an error (the bell sound
is played).

 This is what I have in my .inputrc:
        set editing-mode vi
        set bell-style audible
        # See if you are in insert or normal mode
        set show-mode-in-prompt on
        set keymap vi-command

        1) while in vi-insert mode, write some text;
        2) switch to vi-command mode, then press '0D';
        3) return to insert mode, then repeat steps 1 and 2 for a
couple of times;
        4) switch to vi-command mode, then press 'p';
        5) press 'o' (the key I bound to vi-yank-pop).
If 'vi-yank-pop' should work like 'yank-pop', pressing 'o' repeatedly should
cycle through the text you previously killed with 'D', but it seems
like an error is issued.

Best wishes,
Matteo Paolini

reply via email to

[Prev in Thread] Current Thread [Next in Thread]