Closed raffaem closed 7 months ago
That is the correct behavior.
What inserts the newline is not yy
, but p
. For the linewise range, p
pastes the lines after the current line. This is exactly Vim's behavior. I haven't thought about it consciously until now, but after some trials, I feel the current behavior is still natural even in the shell. Though, it's interesting to see some people seem to expect a different behavior.
If you want to paste the line before the current line, you need to use P
. Or if you expect p
to always behave like P
, you might consider rebinding it as ble-bind -m vi_nmap -f p vi_nmap/paste-before
.
oh right, my bad.
Thanks for looking into this!
When you press
yy
in normal mode, the line is copied with a new line in front of itTo reproduce
echo "hello"
yy
p
\necho "hello"
will be pasted