Skip to content

Instantly share code, notes, and snippets.

@tmacam
Forked from asandroq/gist:380184
Created August 2, 2010 20:50
Show Gist options
  • Save tmacam/505284 to your computer and use it in GitHub Desktop.
Save tmacam/505284 to your computer and use it in GitHub Desktop.
;; joins two consecutives lines like vim's "J"
(defun join-lines ()
(interactive)
(save-excursion
(end-of-line)
(insert-char ? 1)
(delete-char 1)
(while (looking-at "\\s +")
(delete-char 1))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment