An attempt at providing vim's ci
and ca
for Emacs.
Originally here,
this forks contains breaking changes and is unlikely to land upstream—hence, a separate repository.
Instead of expand-region, this fork requires puni to work. A blog post going in some more details may be found here.
A usage example, from the upstream repository:
function test() {
return "semantic| kill";
}
with |
indicating the point.
-
change-inner "
would kill the contents of the string, resulting infunction test() { return "|"; }
-
change-inner-outer "
would kill the entire string:function test() { return |; }
-
change-inner {
would kill the return-statement:function test() {|}
-
change-inner-outer {
would kill the entire block:function test() |
The easiest way to install this is using package-vc.el
:
(package-vc-install "https://github.com/slotThe/change-inner")
Good keybindings for change-inner
and change-inner-outer
could be M-i
and M-o
:
(global-set-key (kbd "M-i") 'change-inner)
(global-set-key (kbd "M-o") 'change-inner-outer)
Optionally you can also use vc-use-package:
(use-package change-inner
:vc (:fetcher github :repo slotThe/change-inner)
:bind (("M-i" . change-inner)
("M-o" . change-inner-outer)))