News for hackers. Stuff that matters.
Re:Syntax Highlighting Off by pmoriarty on Sunday March 13, 2016 @11:39AM (#11278023)
One of the most important benefits of syntax highlighting that no one in this thread seems to be discussing is the highlighting of syntax errors. That is the number one benefit of syntax highlighting for me. It immediately shows me where there's a problem in my code (like if I haven't closed parenthesis or quotes) and keeps me focused on "completing the thought", as it were.

This is also a reason that I don't like using editor features that automatically close parenthesis or quotes when you type the opening pair. That may make the expression syntactically correct, but semantically incomplete and the burden will be on me to notice, since syntax highlighting won't help me then.

Re:Syntax Highlighting Off by barrkel on Sunday March 13, 2016 @01:36PM (#11278519)
Highlighting of errors is, for me, something distinct; a background parse / compile process that reports line numbers is sufficient. It doesn't need deep integration with the editor. A keyboard shortcut to go to the next error and you're pretty much all set.

I'm also not a big fan of overly eager syntax checking because I tend to compose abstractions on the fly, leaving a statement incomplete while I flesh out a dependency, or vice versa. Syntax aware indenting usually breaks badly in this situation - I generally prefer dumb indenting, with an opt-in block or file format option for where I want to fix code over a large area. I've had big fights with Emacs over this; it almost always does the wrong thing by default, whether it's indent location, continuation indent, mixing tabs and spaces in the indent, etc. About half my .emacs is replacement indentation functionality and configuration per mode.

I also don't like auto-completing parentheses, because it puts text ahead of the cursor on the current line. That's a PITA because the editor almost invariably doesn't know when I want to complete the expression or how. Eclipse is the worst at this (it's actually not possible to turn off in a sane way). It interprets RET as completing the expression when I want a line break inside the parens, and I'm constantly having to go back and forth to work around its mistakes.

Re:Syntax Highlighting Off by bpchaps on Sunday March 13, 2016 @02:30PM (#11278747)
Autocompleting is by far my biggest pet peeve in modern IDEs. With default settings in Jupyter, for example, typing """ immediately creates another """. Another great one is when autocomplete tries to be vindictively clever and often deletes your open parentheses if you delete its closed parenthesis. Complete concentration killer.
Re:Syntax Highlighting Off by ninkendo on Sunday March 13, 2016 @02:39PM (#11278781)
> It immediately shows me where there's a problem in my code (like if I haven't closed parenthesis or quotes) and keeps me focused on "completing the thought", as it were.

Funny, because I dislike having syntax errors highlighted for the exact same reason. If I'm typing new code, I like to keep my thoughts on the reasoning behind what I'm typing, and leave it until later to "clean up" the code and get it syntactically correct. Having big red highlights around code that I haven't finished writing yet is a huge distraction... the editor seems to be beckoning to me: "Stop typing and close that paren! Why are you still typing! It's not corrreeeeect yet!!!". And usually it's enough distraction to cut off a good train of thought.

It gets worse when the editor starts complaining about full compilation errors, like calling functions I haven't written yet. When I'm in a more "creative" part of my coding (like when I'm doing lots of brand new functionality), there's a certain ordering of what I write first and what I fill in later, and having an IDE yell at me the whole time is just tiresome.

Re:Syntax Highlighting Off by noir_lord on Sunday March 13, 2016 @04:50PM (#11279278)
Alongside the errors which I agree with and mentioned elsewhere one of the things I really like about intellij (sure others do it) is you can highlight the variable under the cursor in different colors (for read/write), I have mine set to dark red for writes and green for reads, That really helps as you jump around code as you can stick it on a method and it highlights all calls to that method in the code.
Re:Syntax Highlighting Off by nicholaides on Sunday March 13, 2016 @12:39PM (#11278263)
The author does mention that, though, when he's talking about the pros and cons in the very beginning of the article:

> What do I miss? Syntax highlighting hinting that I made a dumb typo (importance is directly proportional to compile time or speed of running syntastic).