Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

When I started working on a Clojure web app full time, I forced myself to spend a week learning and configuring Emacs, and learning Paredit.

To this day I have not found a tool that works as well as Paredit for editing and navigating s-expressions.

Parinfer looks like a cool subset of Paredit's abilities. I'd love to see it expanded to include all of what Paredit can do.

EDIT: I was mistaken, Parinfer does things Paredit doesn't. They could totally work together, that'd be pretty awesome.



I see no reason they couldn't coexist. Parinfer to guess paren insertion; paredit to cover the operations parinfer can't infer.

I'm more concerned that Parinfer appears to be modal, based on whether you manage indentation or parens. This seems overly complicated; it would be nice if there's some elegant way to merge the features of both into one mode. But I don't know how to do this, and I haven't actually used Parinfer, so maybe there's nothing to worry about.


It looks like one of the modes is mainly intended for fixing unmatched parens before switching into the other mode.


>To this day I have not found a tool that works as well as Paredit for editing and navigating s-expressions.

https://github.com/Fuco1/smartparens

Basically paredit on steroids.


That's a lot of paragraphs. Got a tl;dr on how it improves on Paredit?


>That's a lot of paragraphs. Got a tl;dr on how it improves on Paredit?

The readme is not "a lot" in the slightest, the first paragraph of is a perfect summary. I'm sorry for being rude, but if you can't even bother to read one measly paragraph, I'm probably wasting my time writing this comment for you. The first paragraph is barely even longer than your original comment (10 words longer)!

The readme also links to a list of features and an article with gifs. Additionally, I gave you an even shorter and simpler tl;dr in my original comment: "basically paredit on steroids".


I was curious too, so I took a walk through the documentation. I found this:

https://github.com/Fuco1/smartparens/wiki/Paredit-and-smartp...

I think I might try it out. It seems by default it's less strict than paredit, though, so I'll have to tweak it a bit.


> It seems by default it's less strict than paredi

Yes, but there is a strict mode you can turn on. Personally, I use the default with a couple binds that make it a bit more strict, which actually make it very pleasant to use, such as:

    (global-set-key (kbd "C-<backspace>") 'sp-backward-kill-word)
    (global-set-key (kbd "M-d") 'sp-kill-word)
And these in modes derived from `prog-mode`:

    (local-set-key (kbd "<backspace>") 'sp-backward-delete-char)
    (local-set-key (kbd "C-d") 'sp-delete-char)


Unless we are looking at different pages, that Readme for smartparens is quite small.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: