Skip to content

slotThe/change-inner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

change-inner

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 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:

(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)))

About

Vim's ci/co in Emacs!

Topics

Resources

License

GPL-3.0, Unknown licenses found

Licenses found

GPL-3.0
LICENSE
Unknown
LICENSE-UPSTREAM

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published