Skip to content

Instantly share code, notes, and snippets.

@aaron-em
Created July 26, 2015 14:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaron-em/54e0dcf92a153d362d00 to your computer and use it in GitHub Desktop.
Save aaron-em/54e0dcf92a153d362d00 to your computer and use it in GitHub Desktop.
(defun kill-and-yank-at-line (line)
"Kill the region and yank it at the given LINE."
(interactive "nLine: ")
(save-excursion
(kill-region (region-beginning) (region-end))
(goto-line line)
(yank)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment