Visual Studio Tip #6: Turn on those line numbers (with Quick Launch)

Writing code is very often a collaborative process and to discuss something you need to be able to refer to it. The simplest way to refer to a line of code is “look at line #26.” For some reason though, line numbers are not on by default. Before Visual Studio 2013 (which syncs your preferences across machines) turning on line numbers was one of the very first things I did on a every new computer.

Now how to do that? – Quick Launch! Visual Studio is a massive product with tons of options. Finding the one you need is more easily done via search. The Quick Launch box(that text box in the upper right on the title bar of the window) searches Visual Studio instead of searching your code (use Navigate To for searching code).

1 - quick launch

To find the options regarding line numbers, just type “Line Numbers” into the Quick Launch window and it will show you what it finds in the options dialog, the menus, and any open documents names & paths (but not the contents).

2 - line numbers search result

Select the item in the Options section. It tells you how that the Line Number option is in the General tab of the All Languages section of the Text Editor options. Visual Studio will open the Options dialog to the correct page. Check the Line Numbers box and close the dialog box.

3 - options dialog

Other stuff – you might have noticed the Task section of the Quick Launch results. Sometimes there are tasks you can run directly as well. In this case I could have just clicked the task and it would have changed the setting for me without opening the dialog.

This post is part of a series of Visual Studio tips. The first post in the series contains the whole list.

(next tip: Edit whole iines)