3 ms·
Syntax highlighting is nice, but it’s gone way overboard with 31 different categories. I’m not as minimalist as the OP, but I leave on just enough to tell if my
by wrs 3y ago
Syntax highlighting is nice, but it’s gone way overboard with 31 different categories. I’m not as minimalist as the OP, but I leave on just enough to tell if my strings are delimited, notice if variables are misspelled, and make sure I don’t miss a comment. I don’t need the editor to tell me that “if” is a keyword by lighting it up! If I have a philosophy, it’s to put the language in the background and the significance in the foreground.
- _gabe_ 3y agoIt is putting the significance in the foreground. An if statement is a semantic part of the language. Highlighting that is calling out that there is a higher level of programming going on there than a sequential list of instructions. No programmer needs the keyword “if” to be highlighted to know what it means. Also, how does having strings highlighted put significance in the foreground? The only thing it will show you is if you missed a delimiter. It doesn’t call out parts of the program that do something noteworthy.
- wrs 3y agoI don’t “highlight” strings by making them fluorescent green or something. I do put them in a couple of different, same-valued colors so it’s obvious when they aren’t lexing the way I expect (like the variable substitutions aren’t actually substitutions because I forgot to use ` or f”). I do actually highlight some things; for example, method declarations to make them easier to scan for.