;; Duplicate it
(defun duplicate()
"Duplicate it."
(interactive)
(let (
(beg (line-beginning-position))
(end (line-end-position)))
(copy-region-as-kill beg end)
(beginning-of-line)
(forward-line 1)
(yank)
(newline)
(forward-line -1)))
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:
Subscribe to:
Post Comments (Atom)
2 comments:
thanks, very useful for proofs
what is key-binding for this duplication?
Post a Comment