Skip to content

Instantly share code, notes, and snippets.

@asandroq
Created April 27, 2010 01:19
Show Gist options
  • Save asandroq/380184 to your computer and use it in GitHub Desktop.
Save asandroq/380184 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