Duplicate a line in emacs

When coding you often have to duplicate a line. This is a little script for your .emacs file to do this:

;; Duplicate it
(defun duplicate()
"Duplicate it."
(let (
(beg (line-beginning-position))
(end (line-end-position)))
(copy-region-as-kill beg end)
(forward-line 1)
(forward-line -1)))


dublpaws said...

thanks, very useful for proofs

gfh said...

we offer wow power leveling and wow gold wow gold

Anonymous said...

what is key-binding for this duplication?