Skip to content

Conversation

@slacksystem
Copy link

In VI mode, hen I paste from the clipboard something that was copied line-style, (e.g. with yy, or ggVGd), the pasting process leaves an empty line above the pasted content. While that may be the expected behaviour, as pasting a linewise selection (with p) pastes it below generally, I'd argue for an exception in this case. I suggest that when pasting a command into an empty buffer, line-wise or otherwise, folks don't actually want a blank line on top that's not part of the actual copied text. This edits the vi-mode binding for p so that it doesn't leave an initial newline when pasting into the empty buffer (it does however, leave any newlines that were already in the selection, since they were intentionally copied (presumably). I think this should be implemented as the default behavior. Hope submitting a pull request is the right way to suggest this change! If not, please let me know. Thanks!

- In the vi key bindings, when pasting text after the cursor in an empty buffer,
  a leading newline character was being added. This change removes that newline
  when pasting into an empty buffer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant