Hacker News new | ask | show | jobs
by snprbob86 5404 days ago
My experience with Lisp is minimal, and I'm a Vim guy, so I may be totally wrong about this, but...

Doen't nearly all serious Lisp developers use Emacs? And doesn't Emacs have piles of shortcuts for wrapping/unwrapping/manipulating s-expressions? I'd imagine that the resulting number of parens is wildly different than the number originally typed.

Can any experienced Lispers comment on this? Where can I find a cheat sheet of such shortcuts?

2 comments

Not an experienced Lisper, but yes, you're right. If you made heatmaps of the original keystrokes, for a Lisper using Paredit, there would likely be a decent highlight on the open paren but almost nothing on the close, as Paredit inserts parens in pairs. Hitting ( inserts ().

I don't think Paredit isn't included in Emacs, but here's the relavent page on the Emacs Wiki: http://www.emacswiki.org/emacs/ParEdit and here's a cheatsheet: http://www.emacswiki.org/emacs/PareditCheatsheet

There's also something similar for Vim, or at least something bundled with slimv, which is more than just Paredit (supporting something like SLIME) http://www.vim.org/scripts/script.php?script_id=2531

Most Emacs lispers turn on Paredit after a little while. The major win there is never having invalid structure to your code, but there is the handy side-effect of never having to type a closing paren: http://www.emacswiki.org/emacs/PareditCheatsheet

Note the images in the article are done by static analysis of text files, which is very different from measuring what people actually type.