Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging change-inner into puni? #74

Open
slotThe opened this issue Jan 7, 2025 · 0 comments
Open

Merging change-inner into puni? #74

slotThe opened this issue Jan 7, 2025 · 0 comments

Comments

@slotThe
Copy link
Contributor

slotThe commented Jan 7, 2025

Hi,

I've written a small package that ports vim's ci and ca functionality to Emacs; quoting from the readme, given a function like

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

Originally based on magnars/change-inner.el, the package now uses puni instead of expand-region for selecting the appropriate region of text.
In slotThe/change-inner#1 I was asked why this was not included upstream, and the only answer I could come up with is that puni generally seems to favour very general structural editing functions, and this is rather specific functionality. However, of course I don't actually know, so this issue exists to clarify that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant