Skip to content

Instantly share code, notes, and snippets.

@zane
Created March 31, 2011 23:49
Show Gist options
  • Select an option

  • Save zane/897494 to your computer and use it in GitHub Desktop.

Select an option

Save zane/897494 to your computer and use it in GitHub Desktop.
(defun duplicate-line()
(interactive)
(save-excursion
(move-beginning-of-line 1)
(kill-line)
(yank)
(open-line 1)
(next-line 1)
(yank)))
(global-set-key (kbd "C-c C-d") 'duplicate-line)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment