1. 11

  2. 2

    I suppose this isn’t very hip, but I develop mostly in Scala, and I use eclipse, and scala-ide, which is an eclipse plugin. So not only do I have syntax highlighting, but eclipse is constantly compiling my code to tell me if I have an error anywhere, and will underline it in red if it appears. This means that at test time, I am usually pretty sure that it will compile, and since I’m generally programming in a functional style, it usually works too.

    This is more necessary in scala, because the build tool takes a long time to load, much less compile anything, and even just scalac by itself is very slow. Incremental compilation with the build tool makes things a little bit better, but it’s still not as fast as eclipse itself. Eclipse provides me with an extremely fast, and extremely tight feedback loop with my typechecker, which gets me practically half of the way to correctness.

    When I can find ways that let my IDE give me richer information, such as highlighting trailing whitespace, I usually take them. I prefer to let my IDE do that mental legwork, rather than having to do it myself. It just feels like busywork to have to remember things like what is a reserved keyword, and what isn’t, probably my favorite use of color.

    I haven’t tried removing colors from my .emacs, but switching from eclipse to emacs, I definitely feel less productive in emacs, and like I spend time chasing down problems that eclipse would have caught for me much earlier.

    I guess making coding harder incentivizes you to plan more carefully before writing, and a week of hacking can save you an hour’s worth of careful thought, but I definitely appreciate my colors right now. Might be worth trying it out though, sounds interesting.

    1. 2

      I used syntax highlighting pretty heavily when I did clojure stuff; the jvm’s forever and a year start up times are a good incentive to squash problems beforehand. The things I generally do in emacs I do use syntax highlighting for (i.e. common lisp and, at one time, clojure). Of course, I usually have SLIME open as well, which gives a pretty good indication of syntax errors. Functional programing does make testing a lot easier!

      I do have a KNR addition to my .vimrc which doesn’t highlight syntax, but shows a red marker on trailing whitespace (or whitespace in an empty line) as well as a red marker on lines > 80 characters (I write most of my C and Go in side by side terminals; vim in one terminal and another terminal in the project directory as well; I actually try for 72 character lines because I have a large font size and the line numbers in the side bar often push the line over).

      Both Go and C have a very small number of reserved keywords (~25 if my memory serves me correctly), so it’s not too big of an issue for me to keep the set of reserved words in my head. As I mentioned in the blog post, for those two languages I’m fluent enough that those sorts of details don’t bog me down at all. For CL, with it’s thousand or more built-ins, it’s definitely problematic.

      I do take the opposite view from you in the last paragraph. I don’t find that removing syntax highlighting in Go and C makes coding harder, especially once you learn to read the code more like you would read a book. Again, it’s a matter of perspective and your language. I have no experience with Scala, but it sounds something akin to Clojure (a functional language on the JVM). The JVM start up times alone make having your IDE doing all this extra work a definite plus; whereas, in some other languages, it hinders my ability to keep the program in my head.

      I can absolutely see where you are coming from on this.

    2. 2

      I use syntax highlighting mostly just for pointing out unterminated quotes and such. I find colors very distracting and use them very sparingly in vim, mutt, irssi, etc. (usually just shades of gray in a 256-color terminal). Back when I used to do a lot of work on my VT510 (monochrome) I relied on vim using underline, bold, and reverse terminal attributes to do highlighting, so I kept it with my current setup (a bunch of xterms).

      Here’s a screenshot showing mutt and vim using my vimrc and vim colors. I have nerdtree setup so the buffer window is 80 characters wide and nerdtree takes up the rest. When nerdtree is off, vim displays a faint gray line down the 80 character column.

      On a side rant, I hate when command-line utilities blindly assume the user is using a black background terminal and start spewing colored output that is completely unreadable on a white background. This seems to be a recent trend among the ruby/node.js crowd and I hate it. I shouldn’t have to dig around for command line switches or .rc file options to disable colors just so I can read the output.

      1. 1

        I think the seeds of being happy without colours came from learning to program on a monochrome Apple //, and that’s why the vim colour scheme I’m working on will only use underlining (I’m leaning towards underlining string literals), bold, and italics.

        I guess I didn’t include a screenshot in my article; so, I uploaded a screenshot. My vimrc is on github, and I’ve been using w0ng’s vim-hybrid scheme because I’ve found the default plaintext colour scheme to be quite palatable.

        I’m not a huge fan of coloured output, either. On my OS X machine, I use transparent terminals, and colours don’t show up so well.

      2. 1

        I feel like I am having a similar experience. And it is also because I am using the Acme editor more and more :). Another point that I’d like to make is that when I’m reading code in books there usually isn’t any highlighting and yet I have never felt like I had trouble understanding what was going on. It seems like you can change the meaning of syntax highlighting and just reverse things which a a big deal; maybe string literals?

        1. 1

          So far this has been working out very well for me. I’m wokring on a vim colors file that italicises string literals and bolds comments, but I haven’t really gotten aorund to it yet. I’m interested to see what other people think. What keeps you to using syntax highlighting? Or, why did you ditch it?

          1. 2

            I usually use syntax highlighting purely to find unterminated strings. I don’t mind if I’m using notepad.exe to code or something more powerful.

            1. 1

              The string problem is one of the few cases I find syntax highlighting useful, which is why I’d like to get a vim colour scheme set up for the two previously mentioned cases.