Live data from Hacker News

Turning off syntax highlighting

dudzik.co

21–30 of 192 posts

Re: Turning off syntax highlighting

#22
post #7

No thanks. The last time I could bare not using syntax highlighting I was still on MS-DOS. Since Turbo Pascal 7 (released in 1992), syntax highlighting is a must have on my programming environment. But I understand when we are talking about vim, people prefer an hardcore experience.

Huh, I thought being "hardcore" about vim meant writing your own syntax highlighting rules. (Which isn't that hard, though vimscript does have some weird quirks.)

Re: Turning off syntax highlighting

#23
post #2

Slightly meta: Turning off the syntax highlighting entirely seems a bit hardcore to me, however, I always read each commit I do via git diff / pull request view, which does not have syntax highlighting (other than red/green for removals/additions), and I always strive to make the diff look good for each commit (which means, doing one thing at a time in each commit, and making sure it reads well). Unfortunately, not e…

Agreed. The first thing the older guys taught me at my first internship was `git add --patch`.

Re: Turning off syntax highlighting

#24

I like to highlight just the places where you are defining new variables/functions/types so that the definition is easy to spot. What is the point of highlighting keywords? I suspect that highlighting engines do it simply because it's easy to do, not because it's useful. It looks like this: http://david.rothlis.net/code_presentation/distracting_synta...

That code is pretty unreadable to begin with, don't think any highlighting or not can save it. But I prefer the Eclipse one, it lets you quickly find the various blocks (public, protected etc.) when skimming through. The proposed scheme is one giant blob.

Re: Turning off syntax highlighting

#25
I think a large part of the issue with syntax highlighting is that our "standard" for syntax highlighting is rather dumb. A few thoughts:

- Who the hell would write prose by making all the verbs blue, the nouns red, and the adverbs green (or something to that effect). That's what we do for code. Something togglable a-la iA Writer might make sense, though. At the same time, I can sort of understand, though, because we're almost always in "edit" mode for code, very rarely in pure "write".

- I find having lint-errors highlighted provides a similar nudge to the "squiggly-red underline spellcheck".

- Our editors aren't configurable enough with regards to typography. I like to use subtle weight changes, highlighting "headings" and whatnot, and very few tools seem to make that change available.

- Semantic highlighting seems super interesting, but I haven't found a tool that I like yet.

One project I'd love to see is to get a bunch of folks together to do some proper layout-by-hand on code -- Given 100% control over typography, how would you format it to maximize readability, minimize distraction, highlight relevant contextual knowledge, etc? And then work to push tools in a direction that they support configuration to allow for said tasks.

Re: Turning off syntax highlighting

#26
post #3

I totally agree with this, and use `:syntax off`, but comments really mess with visual clarity. For dimmed comments, I sometimes switch to nofrils. https://www.robertmelton.com/2016/04/10/syntax-highlighting-...

Comments are the most important part of code. They should not be dimmed. If anything, they should be the only thing that is highlighted.

Re: Turning off syntax highlighting

#28
post #7

No thanks. The last time I could bare not using syntax highlighting I was still on MS-DOS. Since Turbo Pascal 7 (released in 1992), syntax highlighting is a must have on my programming environment. But I understand when we are talking about vim, people prefer an hardcore experience.

I don't think that's what "hardcore" means to a vim user. Vim is all about convenience for me.

Re: Turning off syntax highlighting

#30
post #25

I think a large part of the issue with syntax highlighting is that our "standard" for syntax highlighting is rather dumb. A few thoughts: - Who the hell would write prose by making all the verbs blue, the nouns red, and the adverbs green (or something to that effect). That's what we do for code. Something togglable a-la iA Writer might make sense, though. At the same time, I can sort of understand, though, because we…

> Who the hell would write prose by making all the verbs blue, the nouns red, and the adverbs green (or something to that effect).

Slightly off topic, but I think doing this could actually be useful for learning languages, especially highly inflected ones (if you extend the color coding to account for gender, case, etc.).

Post reply on HN