]> code.delx.au - gnu-emacs-elpa/blob - README.rst
Doc fix and small tweaks
[gnu-emacs-elpa] / README.rst
1 =============================
2 Kill Things Easily in Emacs
3 =============================
4
5 Commands ``easy-kill`` and ``easy-mark`` let users kill/mark things at
6 point easily.
7
8 ``easy-kill`` is a drop-in replacement for ``kill-ring-save``. It
9 tries in order:
10
11 #. current region if active
12 #. url at point (snarf char properties ``help-echo``, ``shr-url``,
13 ``w3m-href-anchor`` etc.)
14 #. email at point
15 #. current line
16
17 Keys (customisable) immediately following ``easy-kill``:
18
19 #. ``w`` -> word at point
20 #. ``s`` -> sexp at point
21 #. ``f`` -> file at point
22 #. ``l`` -> list at point
23 #. ``d`` -> defun at point
24 #. ``b`` -> ``buffer-file-name`` or ``default-directory``
25 #. ``@`` -> append selection to previous kill
26 #. ``C-w`` -> kill selection
27 #. ``+``, ``-`` and ``0..9`` -> expand/shrink selection
28 #. ``SPC`` -> turn selection into an active region
29 #. ``C-g`` -> abort
30
31 The following `screenshot <http://i.imgur.com/8TNgPly.png>`_ shows
32 ``M-w l`` in action:
33
34 .. figure:: http://i.imgur.com/8TNgPly.png
35 :target: http://i.imgur.com/8TNgPly.png
36 :alt: ``M-w l``
37
38 To Use
39 ~~~~~~
40
41 ::
42
43 (require 'easy-kill)
44 (global-set-key [remap kill-ring-save] 'easy-kill)
45
46 Extensions
47 ~~~~~~~~~~
48
49 New things can be defined by following package ``thingatpt.el``'s
50 convention, or by defining new functions named like
51 ``easy-kill-on-THING-NAME``. See ``easy-kill-on-buffer-file-name`` and
52 ``easy-kill-on-url`` for examples.
53
54 Bugs
55 ~~~~
56
57 https://github.com/leoliu/easy-kill/issues