0

When using the browse-kill-ring package to insert some text from the kill ring, the text always gets inserted before point.

This is not intuitive to vim users who are used to pasted text being inserted after the character to the right of point, as it is with the default evil/vim keybinding p (aka the evil-paste-after command).

I'd like to change browse-kill-ring's behavior so it acts more like vim (or evil-paste-after).

The following examples will illustrate what I mean.

Note: . in the examples designates the position of point.

Note: The example text inserted will always be XYZ

Before insert:
.abc

Current behavior after insert:
XYZ.abc

Desired behavior after insert:
aXY.Zbc

------------------------------

Before insert:
a.bc

Current behavior after insert:
aXYZ.bc

Desired behavior after insert:
abXY.Zc

------------------------------

Before insert:
ab.c

Current behavior after insert:
abXYZ.c

Desired behavior after insert:
abcXY.Z

------------------------------

Before insert:
.

Current behavior after insert:
XY.Z

Desired behavior after insert (same -- no change needed):
XY.Z
  • Have you tried p and repeatedly hitting C-p yet? – wasamasa Sep 27 '17 at 5:08
  • wasamasa: I didn't know about that feature. It's useful, but does not really solve my problem, as I want to visually browse the kill ring before selecting the one entry from it to paste in. Also, browse-kill-ring allows me the use of the full vim/evil/emacs movement commands (and things like ace-jump) to get to the selected position I'm interested in. In contrast, with the C-p method, I not only have no way to view a screenful of paste candidates, but I have to move serially through entry after entry. So I'd really like to get browse-kill-ring working the way I want instead. – izkon Sep 27 '17 at 5:18
  • Dan: I tried advising various browse-kill-ring-insert functions to do evil-forward-character before they ran, but that didn't work. – izkon Sep 27 '17 at 5:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.