Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/slotthe/change-inner
Vim's ci/co in Emacs!
https://github.com/slotthe/change-inner
editing emacs emacs-mode
Last synced: about 2 months ago
JSON representation
Vim's ci/co in Emacs!
- Host: GitHub
- URL: https://github.com/slotthe/change-inner
- Owner: slotThe
- License: gpl-3.0
- Created: 2023-10-29T12:44:37.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-29T12:53:17.000Z (about 1 year ago)
- Last Synced: 2024-10-15T07:51:57.817Z (3 months ago)
- Topics: editing, emacs, emacs-mode
- Language: Emacs Lisp
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: change-inner.el
- License: LICENSE
Awesome Lists containing this project
README
# change-inner
An attempt at providing vim's `ci` and `ca` for Emacs.
Originally [here](https://github.com/magnars/change-inner.el),
this forks contains breaking changes and is unlikely to land upstream—hence, a separate repository.Instead of
[expand-region](https://github.com/magnars/expand-region.el),
this fork requires
[puni](https://github.com/AmaiKinono/puni)
to work.
A blog post going in some more details may be found
[here](https://tony-zorman.com/posts/change-inner.html).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 in
function 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() |
## Installation
The easiest way to install this is using `package-vc.el`:
``` emacs-lisp
(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`:
``` emacs-lisp
(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](https://github.com/slotThe/vc-use-package):``` emacs-lisp
(use-package change-inner
:vc (:fetcher github :repo slotThe/change-inner)
:bind (("M-i" . change-inner)
("M-o" . change-inner-outer)))
```