Hacker News new | past | comments | ask | show | jobs | submit login

If your IDE didn't use color to indicate syntax, would you want different information conveyed through color-coding? Using color to indicate syntax, which is already directly visible in the code you're reading, does seem like sort of a waste if it could be used to convey more useful information.

Using different colors for sync vs async calls could be helpful. Or pure vs. impure. Or how many times a function or variable definition is used elsewhere in the code base, exercised in tests, referenced in the documentation, etc. I think I would find this sort of non-local information more useful than syntax highlighting.

There was a blog post linked here a couple weeks ago that used color shading to distinguish levels of nested parentheses, with color shift on mouseover, which was interesting.

The article suggests marking "=" and "==" in different colors, which doesn't seem very useful unless the font shows adjacent = characters with no space between them.




There is a mode for Emacs that picks a different color for different identifiers and uses the same color for a given identifier throughout the code to better aid picking out how a given item is used.

https://github.com/ankurdave/color-identifiers-mode

Inspired by this post

https://medium.com/@evnbr/coding-in-color-3a6db2743a1e




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: