rksm / paredit.js

Generic reader and editor for s-expressions.
MIT License
107 stars 21 forks source link

Move cursor left upon delete sometimes #9

Closed sjlevine closed 2 years ago

sjlevine commented 8 years ago

Hi again Robert,

Thanks again for all your hard work on a great package!

One behavior I really like from Emacs' paredit is moving the cursor left under a backwards delete sometimes. For example, if buffer looks like (())| and backspace is pressed, the result is (()|) instead of remaining unchanged. I personally find this feature really handy for moving around parts of my code quickly and avoiding the arrow keys, and also for deleting lines of code one character at a time.

I've created a pull request for you that implements this behavior. What do you think? If you don't want to enable this behavior by default, a thought I had would be to put a flag in args.

Thanks so much!

All the best, Steve

dijonkitchen commented 6 years ago

Any updates or should it be closed?

rksm commented 2 years ago

...couple years later, sorry for the loooong delay. Yes, I like that change. I rebased and merged, it is in 0.4.0. Thank you!