Skip to content

Instantly share code, notes, and snippets.

@arialdomartini
Created March 17, 2023 15:04
Show Gist options
  • Save arialdomartini/03514abd4a632bd6c237ec8a347014a9 to your computer and use it in GitHub Desktop.
Save arialdomartini/03514abd4a632bd6c237ec8a347014a9 to your computer and use it in GitHub Desktop.
duplicate line
(defun duplicate-line ()
(interactive)
(beginning-of-line)
(let ((from (point)))
(end-of-line)
(let ((to (point)))
(kill-ring-save from to)
(newline)
(yank))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment