Hacker News new | ask | show | jobs
by gt384u 5226 days ago
Something I'd be curious to hear from the pretty lisp designers: what advantages do you feel this offers over an Emacs which just highlights the symbol of interest or region between the matched parens for a particular code block?

By way of context, I was a test subject for a perhaps related project called Code Bubbles http://www.andrewbragdon.com/codebubbles_site.asp a while ago. Since it was for Java, a language which is comparatively verbose and I often have difficulty getting decent code density with, this new IDE interaction was truly novel and I found often useful.

I test drove the Pretty Lisp Demo and felt myself wanting for code density in a language where I don't typically have those issues. It was just too hard to fit a useful quantity of code in a screen.

2 comments

> what advantages do you feel this offers over an Emacs which just highlights the symbol of interest or region between the matched parens for a particular code block?

This already exists: http://www.foldr.org/~michaelw/emacs/mwe-color-box.el

(you can see a screenie in http://www.foldr.org/~michaelw/emacs/color-box.png)

I... love... this...

Seriously though, I wish that emacs put effort into a more modern rendering architecture. So that you could implement this sort of visualization in a more flexible way.

And here's a small survey of lisp expression highlighting UIs from a few years ago, "Five approaches to s-expression highlighting": http://lemonodor.com/archives/2005/08/five_approaches.html
Thank you. I knew that it was an editor feature I'd seen before for lisp code, but didn't recall the name of any one in particular.
You're welcome! I don't know how useful it is in practice. I myself don't mind the parens as long as I can see them match.
That is extremely shiny. Can I get that in Vim?
Well, this is not quite the same, but you can get indent-level highlighting in vim via these sorts of plugins:

http://www.vim.org/scripts/script.php?script_id=3361

http://www.vim.org/scripts/script.php?script_id=1800

Some screenshots:

http://nathanaelkane.imgur.com/indent_guides

http://viming.blogspot.com/2007/02/indent-level-highlighting...

Of course, you can also get rainbow parenthesis in vim via:

  :let g:lisp_rainbow = 1
There should also be some way to get background highlights based on sexpr's instead of just indent level, but I haven't personally seen it.

Edit: actually, come to think of it, I seem to recall hearing that the slimv[1] plugin can do this. But I haven't really played with it myself.

[1] - http://www.vim.org/scripts/script.php?script_id=2531

Hmm, code bubbles actually looks interesting. I might actually try something like that.

Pretty list still doesn't look very appealing to me. It doesn't help organize the code, all it does is replace parenthesis with visual boxes.