AmaiKinono / puni

Structured editing (soft deletion, expression navigating & manipulating) that supports many major modes out of the box.
GNU General Public License v3.0
401 stars 21 forks source link

Implementing puni-down-list #48

Open djr7C4 opened 1 year ago

djr7C4 commented 1 year ago

Hello,

Thank you for creating puni! I am trying it out as I would like something a bit more robust and maintainable than smartparens (which seems to be a bit fragile due to the amount of language specific code in the package).

I was wondering what the main obstacles you've encountered when trying to implement puni-down-list. The reason I ask is because I have some custom code in my configuration that uses `sp-down-sexp' that I would like to port and I would also like to have a down-list command available for interactive use.

I would be willing to help if we can work out any feasible path towards a viable implementation.

I guess we can't simply move forward past the next delimiter according to the syntax table since it seems that it wouldn't work for modes that have delimiters that have multiple characters.

Thanks

AmaiKinono commented 1 year ago

I have completely no idea about how to implement it.

Maybe you could try using the built-indown-list instead. It will work for Lisp and some simple situations in other languages.

djr7C4 commented 1 year ago

Thanks for the reply. Using down-list is what I'm currently doing but it isn't ideal.

I gave this more thought and came up with a couple ideas on how to implement down-list using puni primatives. I'll see if I can come up with a working implementation and get back to you.