[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 01/13: Improve README.rst to include some use examples
From: |
Leo Liu |
Subject: |
[elpa] 01/13: Improve README.rst to include some use examples |
Date: |
Sun, 13 Apr 2014 07:34:38 +0000 |
leoliu pushed a commit to branch master
in repository elpa.
commit 1a0c13a817205f3cab21119bb86fe949ed435e71
Author: Leo Liu <address@hidden>
Date: Mon Apr 7 22:00:15 2014 +0800
Improve README.rst to include some use examples
---
README.rst | 39 +++++++++++++++++++++++++++++----------
easy-kill.el | 2 +-
2 files changed, 30 insertions(+), 11 deletions(-)
diff --git a/README.rst b/README.rst
index 427a251..abe4695 100644
--- a/README.rst
+++ b/README.rst
@@ -1,10 +1,12 @@
=============================
Kill 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:
-#. address@hidden: append selection to previous kill and exit
+#. address@hidden: 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 (Shell, Ruby,
+Octave, SML, Prolog, Modula2, SQL etc.), nxml modes 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
~~~~~~~~~~
diff --git a/easy-kill.el b/easy-kill.el
index 8365aab..cbaa74d 100644
--- a/easy-kill.el
+++ b/easy-kill.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2013-2014 Free Software Foundation, Inc.
;; Author: Leo Liu <address@hidden>
-;; Version: 0.9.1
+;; Version: 0.9.2
;; Package-Requires: ((emacs "24") (cl-lib "0.5"))
;; Keywords: killing, convenience
;; Created: 2013-08-12
- [elpa] branch master updated (d1dd484 -> 47d5d5b), Leo Liu, 2014/04/13
- [elpa] 01/13: Improve README.rst to include some use examples,
Leo Liu <=
- [elpa] 02/13: Provide a universal accessor easy-kill-get and use it, Leo Liu, 2014/04/13
- [elpa] 03/13: New function easy-kill-interprogram-cut, Leo Liu, 2014/04/13
- [elpa] 04/13: Show tooltip describing kill candidate and echo js2 node, Leo Liu, 2014/04/13
- [elpa] 05/13: New format of easy-kill-alist to support append separator, Leo Liu, 2014/04/13
- [elpa] 06/13: New function easy-kill-thing-handler for mode-based dispatch, Leo Liu, 2014/04/13
- [elpa] 07/13: Make js2 dependency optional, Leo Liu, 2014/04/13
- [elpa] 08/13: Implement #10: allow `-' to move before first selection, Leo Liu, 2014/04/13
- [elpa] 09/13: Fix last change for the case of no thing at point, Leo Liu, 2014/04/13
- [elpa] 10/13: Fix #12: don't silenty change to `list' when +/- on `sexp', Leo Liu, 2014/04/13
- [elpa] 11/13: Fix thinko in last change, Leo Liu, 2014/04/13