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

    If you had a really good, intuitive tree editor
People who write Lisp in Emacs seem to swear by Paredit.[1]

I've not used it so I can't respond to either "really good" or "intuitive", but let's see if this works: To the Paredit user who just clicked the comments link followed by Ctrl+F paredit: what do you think of it?

[1] http://danmidwood.com/content/2014/11/21/animated-paredit.ht...



> To the Paredit user who just clicked the comments link followed by Ctrl+F paredit: what do you think of it?

How the hell did you see me doing that? :O. I searched for it after reading top-level thread since a lot of comments are basically describing Paredit.

I'm using Paredit to write Lisp and I really miss this style in other languages. It takes some time to get used to - I finally grokked it after spending ~1 hour (two pomodoros) on structuring and restructuring a block of Lisp code. But after that hour of practice, writing code feels much different.

Lisp code is an explicit tree structure, and what Paredit does is enforce that structure. It lets you move things up and down the tree, or left and right at the same level, automatically maintaining the structure (keeping your parens balanced). It properly handles cutting and pasting parts of a tree. After you internalize those features, you really start to think of code in terms of trees instead of text representation.


Paredit is one of the reasons I find writing emacs-lisp really enjoyable, it made me dislike Python's lack of braces since I could no longer fly through my code as fast :-)

Note: there is now https://github.com/Fuco1/smartparens which might supersede paredit, supporting all kinds of languages; I haven't given it a good try yet though.


Paredit is wonderful and the only way to write lisp.

It let's you treat the code as structures, as trees and work on those directly.

That's all, but it's really really powerful.




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

Search: