4 ms·
Interesting, for me it is the other way around. I use syntax highlighting (but mostly go with Vim's shipped defaults) and like the keyword highlighting the most
by protomikron 10y ago
Interesting, for me it is the other way around. I use syntax highlighting (but mostly go with Vim's shipped defaults) and like the keyword highlighting the most.
E.g. looking at Python code, it highlights 'def', 'if', 'else', 'elif', 'for', 'while', etc. in orange, function identifiers in cyanish and literals (integer, float, strings) redish (on terminal with blackish background).
If I look at code, it helps me to find the beginning of a function and the parts where logic branches (conditions, loops, etc.) start. Some time ago I wrote code without highlighting and although it is obviously possible I found it harder (i.e. it took me more time) to navigate for my eyes. Maybe just using bold or italic would be enough, though.
However thinking about it, it might be a nice experiment to highlight identifiers with a unique color (or at least highlight all occurrences of an identifier below the cursor - I think Eclipse does something like that).