Skip to content

Instantly share code, notes, and snippets.

@lateau
Last active December 10, 2015 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lateau/4428083 to your computer and use it in GitHub Desktop.
Save lateau/4428083 to your computer and use it in GitHub Desktop.
delete all characters from current cursor position to beginning-of-line like vim's "C-u"
(defun delete-forward-all ()
(interactive)
(let ((beg (point))) (move-beginning-of-line 1) (delete-region beg (point))))
(global-set-key (kbd "C-u") 'delete-forward-all)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment