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

I have never cared much about syntax highlighting. I find it distracting, especially when typing. Type opening quotes and your whole buffer turns "stringy" until you type the closing quotes. It's enough to induce epileptic seizures.

In my editor I switched off all my syntax highlighting except for two things: all comments are in bold (for I agree with the author that comments should be in your face) and comments marked with "TODO" are in pesky red, nudging me to fix the marked issue ASAP.



I like basic syntax highlighting, but I'm not picky about the coloring other than it being Solarized in the cases where I can choose. I like that different things are highlighted differently: it's a simple semantic bug checker ("Why is everything red? Oh, I forgot to close that quote.").


The quote issue is quite true, although some editors have "smart" input modes which will introduce open+close syntax at the same time, and "step over" the close syntax when typed (rather than duplicating it).

For example in Emacs https://www.emacswiki.org/emacs/AutoPairs


Similarly, I made a custom colour scheme that only highlights comments and TODOs: https://imgur.com/zp4GarX

I feel like my ability to read code improved from disabling any other highlighting, but I have no real way of testing whether that's true.


Is that 0x1_0000 a typo? Shouldn't it be 0x1_000 or 0x10_000 instead?


Note that it's not my code, nor am I familiar with it. I just had it lying around on my disk to try out Alacritty.

Here's the line in question: https://github.com/jwilm/alacritty/blob/master/alacritty_ter...

I agree 0x1_000 or 0x10_000 would make more sense, but it doesn't look like the actual value used is hugely significant.


It makes sense to group hexadecimal numbers by two (nibbles).

In this case 0x1_0000 is the least-significant bit of the third byte.

If that's a bit flag encoded in a 32bit value, I also like 0x0001_0000 for clarity.




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

Search: