I'm trying to write a very simple function to replicate the Vim 'p' command. This is, paste some text after the current line.
I've been googling for a while and haven't found a function to achieve this, which I think it's very strange as I consider this quite handy!
I'm aware of the awesome Evil-mode, but I just require only this functionality to be happy :-)
So far this is what I have:
(defun paste-after-line () (interactive) (prelude-smart-open-line nil) ;; This function opens a new line below (yank))
It works, but if the copied text has a line ending, then the yanked text also adds an empty line below the text and places the cursor there.
Does anyone knows if is there a way to yank some text excluding any new line on it?