I hadn’t posted in a while and I decided to do a quick – and geeky – post on something that just annoyed me quite a bit:

As you probably assumed from some posts in this blog, I often code with Matlab. It is quick, easy and works well. Anything I need to simulate or quickly code and test responds very well to Matlab. Recently I have started coding also in Python and C++ for some specific projects. I installed Visual C++ 2008 and after a couple of hours I noticed something that seemed bizarre to me: the code line numbers were not displayed! How is this even possible? It sounds stupid.

My first reaction was “calm down, calm down”. I am sure that if you click anywhere in the code, somewhere on the screen – usually bottom, right – you will see the line and column number. This was indeed the case but, still, I find it quite annoying that the code line number is not shown by default. It was even more annoying when I spent a few minutes trying to find out how to activate this “option”. And I could not.

I had to Google for the solution and this is what I found:

To display line numbers in the code window (aka. Text Editor) do this …

1. Tools > Options > Text Editor > All Languages > General

2. On the right, under Display section, put tick mark for Line numbers.

3. Press OK.