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

> Variable-scoping-level highlighting—variables in the same scope highlighted the same color.

I played with this idea in the syntax highlighting of the code samples in this article: http://david.rothlis.net/c/compilation_model/#chapter005

but would you want all variables at the same scope in the same colour? Different colours for each variable, with the darkness/lightness indicating the scope?

> grep-only highlighting—define a set of things to grep for quickly and highlight them.

Emacs has this with the "highlight-regexp" command. To be honest I don't use it that much. What I do like is highlighting all matches whenever you're doing a "find in file" (though unlike highlight-regexp, the highlighting disappears as soon as you exit the search). I probably use this more because I use search all the time (who doesn't), whereas I tend to forget that "highlight-regexp" even exists.

> block-focused—highlight code blocks so you get an idea of the overall structure of your program.

A few examples of how this might look: http://web.archive.org/web/20080723220126/http://lemonodor.c...

> No-highlighting

In Emacs the "font-lock-mode" command will toggle all highlighting; and you can specify the "level" of highlighting you want by setting the "font-lock-maximum-decoration" variable (you could set up a specific key to toggle this variable). I think these levels were originally intended for performance reasons, so they're cumulative (enabling level 3 also brings in all the highlighting from levels 1 & 2) rather than individually-toggleable features.

I only bring up Emacs because that's what I'm familiar with, and because I'd like more people to experiment with these types of things in Emacs. But perhaps Sublime Text would be a better platform for such experiments, for some people; I don't know.



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

Search: