Kill Things Easily in Emacs
Emacs Lisp
Switch branches/tags
Nothing to show
Pull request Compare This branch is 87 commits behind leoliu:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Kill Things Easily in Emacs

easy-kill let users kill things at point without moving point. Its goal is to be a drop-in replacement for kill-ring-save. It tries in order:

  1. current region if active
  2. url at point (snarf char properties help-echo, shr-url, w3m-href-anchor etc.)
  3. email at point
  4. current line

Keys (customisable) immediately following M-w:

  1. w -> word at point
  2. s -> sexp at point
  3. f -> file at point
  4. l -> list at point
  5. d -> defun at point
  6. b -> buffer-file-name or default-directory
  7. C-w -> kill current region
  8. +, - and 0..9 -> expand/shrink selection
  9. C-@ or C-SPC -> turn current selection into an active region

The following screenshot shows M-w l in action:

``M-w l``

To Use

(require 'easy-kill)
(global-set-key "\M-w" 'easy-kill)


New things can be defined by following package thingatpt.el's convention, or by defining new functions named like easy-kill-on-THING-NAME. See easy-kill-on-buffer-file-name and easy-kill-on-url for examples.