Kill & Mark Things Easily in Emacs
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
.. image:: https://travis-ci.org/leoliu/easy-kill.svg?branch=master :target: https://travis-ci.org/leoliu/easy-kill :align: right :alt: Travis CI build status
easy-markto let users kill or mark things easily.
Comments, bug reports and patches are highly appreciated.
easy-killis a drop-in replacement for
kill-ring-save. To Use: ::
(global-set-key [remap kill-ring-save] 'easy-kill)
After this configuration,
M-wserves as both a command and a prefix key for other commands.
M-walone saves in the order of 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 l: save list at point (enclosing sexp)
M-w d: save defun at point
M-w D: save current defun name
M-w f: save file at point
M-w b: save
-changes the kill to the directory name,
+to full name and
The following keys modify the selection:
@: 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
1..9: expand/shrink selection
0shrink the selection to the initial size i.e. before any
SPC: cycle through things in
C-SPC: turn selection into an active region
M-w wsaves current word, repeat
wto expand the kill to include the next word.
5to include the next 5 words etc. The other commands also follow this pattern.
-does expanding/shrinking according to the thing selected. So for
wordthe expansion is word-wise, for
list-wiseexpanding/shrinking work well in lispy modes (elisp, Common Lisp, Scheme, Clojure etc.), smie-based modes (Prolog, SML, Modula2, Shell, Ruby, Octave, CSS, SQL etc.), Org mode, 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
.. figure:: http://i.imgur.com/8TNgPly.png :target: http://i.imgur.com/8TNgPly.png :alt:
easy-markis similar to
easy-killbut marks the region immediately. It can be a handy replacement for
-to do list-wise expanding/shrinking and marks the whole sexp even when in the middle of one. ::
(global-set-key [remap mark-sexp] 'easy-mark)
easy-killis part of GNU ELPA and is also available on
New things can be defined by following package
thingatpt.el's convention, or by defining new functions named like
Dselects current defun name.
SPCselects things in
easy-markprints help info.
M-w lcan select the enclosing string.
easy-marklearns exchanging point & mark.
0now sets the selection to its initial size before any
M-w sand list-wise
+/-now work in Org mode.
-can move pass the first selection.
sexpno longer change
THING)`` format is still supported but may be removed in future.