Semantic highlighting

what does tech think about semantic syntax highlighting?
https:[email protected]/* *//coding-in-color-3a6db2743a1e#.jmoe96uk6

Other urls found in this thread:

github.com/arakashic/chromatica.nvim/
twitter.com/NSFWRedditImage

absolutely disgusting.

This is why the "le quotes don't matter" meme needs to die

Too much colour kills the point of highlighting.

Semantic highlighting is a good idea, but a serious fucking nightmare to implement in most editors. Let me know when there's a good language-agnostic plugin in Vim for it.

this

There is one for the C-family in Nvim for starters. It's even asynchronous, so it won't block your editor.

Fuck, forgot the link.
github.com/arakashic/chromatica.nvim/

That's not semantic, that's just highlighting every word with its own color. Try again when your editor can highlight dead code, data tainted by untrusted input, etc.

What's the point? That's the sort of thing that's betters suited for a linter.

Color is nice to gray out comment blocks and fucking useless otherwise. Imagine reading a text where all subjects and objects are bold. Is this useful? No.

Who Needs Color Or Punctuation Or Bold When U Can Emphasize Important Words With Capital Letters Like All Of Mine

Source code is not meant to be read like a novel. Syntax highlighting is like color-coding mechanical parts. I guess all those electrical engineers who have color-coded cables and resistors are idiots as well.

Yeah they are. Imagine all the money that could be saved if all cables and parts were grey.

You are missing the point. When do you actually use color while trying to understand a piece of code? Disable that shit, get used to it for an hour, then try to work on something and see if you actually lost anything.

stop being retarded
source code is not a book. when you read code you generally jump over large sections of code until you find something that you want to focus on. skimming code is far easier with syntax highlighting.

Do it instead of running your mouth.

It's a novel idea and I all for the editor understanding the semantics of the language you're writing, but most implementations end up being rainbow fruit salad which is worse than no highlighting at all.

hard to reach conclusion given no credible example material

who gives a shit

also
ISHIGGGYDDGTHUYGHTGUHTUHDGT

but user how do you get the variables into the html otherwise?

Template interpolation.


One of many reasons to use JSLint.

Syntax highlighting is stupid. I don't do that many more mistakes without it.

Just learn to read and touch type.

ANTISEMITIC SYNTAX HIGHLIGHTING IS NOT KOSHER

The HTML is the one output file in that screenshot that is using templates, pajeet.

Looks ok-ish.. then again, I'm colorblind.

More than semantic highlighting what editors need is semantic indentation
It doesn't matter if you use tabs or spaces, when you are inside a block the editor should indent, when you are outside it should not, going back one ore more levels of indentation, based on the surrounding code
It's much, much easier to spot silly mistakes that can cost countless hours of debugging, because you closed a brace too late or too early, or you missed a keyword: you just check the indentation level
That is also good to keep a uniform indentation style, like what Python does
Currently I've seen only Emacs do it, are there any other editors?

I think most editors that are at least somewhat intelligent do that. Vim does it, and it's something I'd expect from IDEs. Some compilers warn about misleading indentation.

Emacs also lets you re-indent the selection with C-M-\, in case you didn't know.

I think that scope highlighting is the most useful coloring scheme when using a language like Javascript (or another LISP) that has a lot of nested functions.

stop