]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/easy-kill/README.rst
Merge commit '51c140ca9ee32d27cacc7b2b07d4539bf98ae575' from company-master
[gnu-emacs-elpa] / packages / easy-kill / README.rst
index 427a251dcbf0fb8fe887b3a5897bddc2cfae1346..ef660aa3ec8177064468b00e1a6ec39a975dcc10 100644 (file)
@@ -1,10 +1,12 @@
-=============================
- Kill Things Easily in Emacs
-=============================
+====================================
+ Kill & Mark Things Easily in Emacs
+====================================
  
 Provide commands ``easy-kill`` and ``easy-mark`` to let users kill or
 mark things easily.
 
+Comments, bug reports and patches are highly appreciated.
+
 easy-kill
 ~~~~~~~~~
 
@@ -15,25 +17,42 @@ easy-kill
 
 After this configuration, ``M-w`` serves as both a command and a
 prefix key for other commands. ``M-w`` alone saves in the order of
-active region, url, email and finally current line. As a prefix key:
+active region, url, email and finally current line (See
+``easy-kill-try-things``). As a prefix key:
 
 #. ``M-w w``: save word at point
 #. ``M-w s``: save sexp at point
-#. ``M-w f``: save file at point
-#. ``M-w l``: save list at point
+#. ``M-w l``: save list at point (enclosing sexp)
 #. ``M-w d``: save defun at point
-#. ``M-w D``: save defun-name; works even when in a diff hunk
-#. ``M-w b``: save ``buffer-file-name`` or ``default-directory``
+#. ``M-w f``: save file at point
+#. ``M-w b``: save ``buffer-file-name`` or ``default-directory``.
+   ``-`` changes the kill to the directory name, ``+`` to full name
+   and ``0`` to basename.
 
 The following keys modify the selection:
 
-#. ``@``: append selection to previous kill and exit
+#. ``@``: append selection to previous kill and exit. For example,
+   ``M-w d @`` will append current function to last kill.
 #. ``C-w``: kill selection and exit
 #. ``+``, ``-`` and ``0..9``: expand/shrink selection
 #. ``C-SPC``: turn selection into an active region
 #. ``C-g``: abort
 
-See ``M-w l`` (save list at point) in action in `screenshot
+For example, ``M-w w`` saves current word, repeat ``w`` to expand the
+kill to include the next word. ``5`` to include the next 5 words etc.
+The other commands also follow this pattern.
+
+``+``/``-`` does expanding/shrinking according to the thing selected.
+So for ``word`` the expansion is word-wise, for ``line`` line-wise,
+for ``list`` or ``sexp``, list-wise.
+
+``list-wise`` expanding/shrinking work well in lispy modes (elisp,
+Common Lisp, Scheme, Clojure etc.), smie-based modes (Prolog, SML,
+Modula2, Shell, Ruby, Octave, CSS, SQL etc.), Nxml mode and Js2 mode.
+
+To copy the enclosing list in lispy modes, I used to do a lot of
+``C-M-u C-M-SPC M-w``. Now the key sequence is replaced by ``M-w l``
+(save list at point) as shown in `screenshot
 <http://i.imgur.com/8TNgPly.png>`_:
 
 .. figure:: http://i.imgur.com/8TNgPly.png
@@ -53,9 +72,9 @@ sexp even when in the middle of one. ::
 Install
 ~~~~~~~
 
-``easy-kill`` is available on `MELPA
+``easy-kill`` is part of GNU ELPA and is also available on `MELPA
 <http://melpa.milkbox.net/#/easy-kill>`_.
-   
+
 Extensions
 ~~~~~~~~~~
 
@@ -64,6 +83,21 @@ 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.
 
+NEWS
+~~~~
+
+0.9.2
++++++
+
+#. ``-`` can move pass the first selection.
+#. ``+``/``-`` on ``sexp`` no longer change ``thing`` to ``list``
+#. Mouse over the selection now shows description.
+#. Echo js2 node name.
+#. Append now uses sensible separator (customisable via
+   ``easy-kill-alist``).
+#. The format of easy-kill-alist has changed. The old ``(CHAR .
+   THING)`` format is still supported but may be removed in future.
+
 Bugs
 ~~~~