There are so many little options and settings within Microsoft Visual Studio. Which adjustments do you recommend to others?
-
2Nice question. I'm browsing the answers with my VS options window open! – cortijon Apr 22 '10 at 13:31
25 Answers
Line Numbers
- Tools > Options
- Text Editor > All Languages > General
- Display: Line Numbers

- 98,673
- 67
- 256
- 322

- 56,055
- 78
- 209
- 280
-
6
-
5Line numbers are helpful when you're working, locally or remotely, with another developer. "Look at lines 25-30." – Michael Petrotta Oct 09 '08 at 21:26
-
4WEll you can just look at the status bar and check the line you are instead of having 1/4 inch took for nothing about 95% of time ;) – Patrick Desjardins Nov 03 '08 at 20:20
-
3Like Daok said - this seems like HUGE waste of space and I don't think I can ever remember needing them. CTRL-G also works for me. – Tim Dec 29 '08 at 16:38
-
1Line numbers also indicate how much is hidden inside collapsed regions, something you can't see from a single number on the status bar. – Ed Guiness Mar 08 '10 at 10:38
Environment->General->Animate environment tools => OFF.
Speeds UI responsiveness by 82%.

- 6,610
- 4
- 31
- 48
-
5
-
Most lifeguards spend up to 40% of their lives in slow motion. Little known fact. – Stein Åsmul Feb 03 '14 at 12:48
-
3
I've never found dynamic help to be either dynamic or helpful, and just tends to slow visual studio down, so using regedit:
registry key: HKEY_CURRENT_USER\Software\Microsoft\Visual Studio\x.x\Dynamic Help value: Never Show DH on F1 = yes
I'm also keen on setting the following in Options->Projects and Solutions:
- Show Output window when build starts - checked (IMHO easiest way to spot build errors)
- Track Active Item in Solution Explorer - unchecked
(stops every project ending up fully expanded in Solution Explorer)

- 21,988
- 13
- 81
- 109

- 22,782
- 7
- 63
- 80
Tools -> Options -> Environment -> Keyboard
Setup a shortcut to close the active document. Ctrl+Alt+W in my case.

- 1,354
- 8
- 20
- 30

- 34,696
- 4
- 39
- 58
-
2control-f4 is a lot harder to hit than something like ctrl-w (which most apps use to close windows, both in Windows and OSX). – Joseph Daigle Nov 03 '08 at 20:44
-
1I use Control-W, which is the same as the shortcut to close the current tab in some browsers. – Ryan Lundy Jun 11 '09 at 03:21
-
Wow that search window is micro-sized. 4 lines for showing commands available? – John Zumbrum Aug 30 '12 at 16:39
Gotta have the tab indention set up right.
Also, Consolas & Color Themed - white backgrounds hurt my eyes

- 2,096
- 17
- 24
-
-
Purely subjective of course, but I prefer double spaces instead of tabs, so I like to set VS to convert it as such. – thismat Oct 06 '09 at 13:13
Option Strict On
Tools > Options
Projects and Solutions > VB Defaults
Default project settings: Option Strict: On

- 2,966
- 8
- 27
- 41

- 56,055
- 78
- 209
- 280
Personally i hate that VS defaults to "Tab to Spaces" when you are developing in C#. This is so awkward to work with and unnecessary.
Yes, i know there are issues with Tabs but honestly, did any of you ever encounter them coding in C# on Windows?

- 7,967
- 10
- 35
- 41
-
You will if you have a team where one developer doesn't like the default tab width. – Joel Coehoorn Oct 09 '08 at 20:49
-
That is just a display issue and can be configured on each computer without affecting anyone else. However, if one developer does have "tabs to spaces" on and all source files he touched are converted to spaces ... well, that just sucks. – steffenj Oct 09 '08 at 21:38
-
2I totally agree - to save others time: Tools > Options > Text Editor > All Languages > Tabs > Keep tabs – Cory House Nov 17 '08 at 14:33
-
1getting your team to use anything but the default settings is an uphill battle. – Dustin Getz Jan 27 '09 at 17:51
-
and you can use intelligent diffing software if you do run into whitespace commits. – Dustin Getz Jan 27 '09 at 17:51
-
8I hate to start a religious war, but only infidels would check in files with \t instead of spaces. – Frank Schwieterman Aug 04 '09 at 22:59
-
-
"Insert spaces" is evil, If by any reason code gets indented when typing a '}' then all tabs upwards are converted to spaces. That is really a pain in the @ss when diffing the change log, or even worse when doing a Blame (thats the name of the operation in TortoiseSVN, don't know how it's commonly knonwn in other tools) of the source file. – Fede Apr 22 '10 at 13:37
-
2When I see code with TAB indentation, there are always some lines with SPACE indentation too: sometimes one presses spacebar automatically to indent a 1 or more spaces, visually aligning the cursor with other code. Mixed tabs & spaces only work with one specific tab size, and backspace will behave inconsistent. Expand to spaces if you want to be sure your code is consistently indented. @steffenj, @Fede The "my DVCS will complain once" argument can be used against implementing any coding standard. – catchmeifyoutry Sep 02 '10 at 00:12
Several have mentioned custom keybindings. Here are handy default keybinding reference posters…
Microsoft Visual Basic Default Keybindings reference poster
A high quality, print-ready PDF containing the useful keybindings for developers that choose the Visual Basic developer profile in Visual Studio 2008 or use Visual Basic Express.
Microsoft Visual C# Default Keybindings reference poster
Visual C# in Visual Studio 2008 and Visual C# 2008 Express Edition Wall chart showing useful keyboard shortcuts for Visual C# programming language.
I like Microsoft's instructions:
- Download and extract PDF
- Send to favorite full color printer/copier
- Hang on wall
- Code
- Smile

- 56,055
- 78
- 209
- 280
Set the active document you're working on to display in the solution explorer. I've seen a lot of people hunting for their current doc if the project gets too big.
Tools -> Options. Make sure show all settings is checked.
Click on Projects and Solutions.
Enable the Track Active Item in Explorer checkbox.
alt text http://img370.imageshack.us/img370/4821/trackactivedocumentqv2.gif

- 669
- 2
- 10
- 11
-
1I personally find this distracting. A keyboard shortcut that found the active item would be nice though. – Greg Jan 27 '09 at 18:17
-
I found it distracting too. So I use Add-in (http://www.codeproject.com/KB/macros/VSHelper.aspx) to quickly find document when I need it. – Juozas Kontvainis Apr 24 '09 at 07:18
Environment => General => Recent files
24 items shown in Window menu
24 items shown in recently used lists
Environment => General
Show status bar ON
Animate environment tools OFF

- 6,501
- 1
- 28
- 24
I'm somewhat surprised to be the first person recommending Visual Studio Hacks for a lot of suggestions of this variety

- 66,744
- 41
- 126
- 187
Visible white space. (Edit -> Advanced -> View White Space)
The default color is too strong. I immediately change it to silver. (Tools -> Options -> Fonts and Colors -> Visible White Space).
On some displays, even silver is too strong, and I create a "light silver".

- 21,988
- 13
- 81
- 109

- 45,157
- 15
- 111
- 168
-
1This would be easier to follow if your screenshots weren't overly compressed. Next time you might want to use png rather than jpeg, it is lossless and for screenshots without embedded photos usually ends up smaller than a resasonable quality jpeg. Make whitespace visible using: Edit>Advanced>View White Space or pressing Ctrl+E,Ctrl+S To set the colour, use Tools>Option>Fonts and Colors>Visible White Space. – Mark Booth Mar 24 '10 at 14:45
-
Thanks @Mark. FreeImageHosting.net isn't doing a great job for me, either. I've edited to state the menu items in the text. – Jay Bazuzi Mar 27 '10 at 15:29
Window Layouts
This really isn't a setting but something I always do is back up my settings via Tools > Import and Export Settings.
I make sure to back up my window layouts for both single and multiple monitors. It saves frustration when moving from my multi-monitor setup to a single monitor for a presentation.
Not to mention, it makes it easy to get up and running on a new PC.

- 12,739
- 8
- 49
- 62
Fixedsys Font
Tools > Options
Environment > Fonts and Colors
Font: Fixedsys

- 2,966
- 8
- 27
- 41

- 56,055
- 78
- 209
- 280
Always show solution
Tools > Options
Projects and Solutions
Always show solution

- 2,966
- 8
- 27
- 41

- 56,055
- 78
- 209
- 280
Source View
Tools > Options
HTML Designer > General
Start pages in: Source View

- 2,966
- 8
- 27
- 41

- 56,055
- 78
- 209
- 280
-
This doesn't seem to be available in the Express version and that makes me sad. – bouvard Oct 28 '08 at 21:13
-
Bouvard, remmember to check the "Show All Settings" button, at the buttom of the dialog – Jesper Blad Jensen Jan 27 '09 at 18:12
Check out this thread for the Color theme options for Visual Studio https://stackoverflow.com/questions/141371/which-visual-studio-color-theme
And consolas is my favourite font
In a control's properties, setting GenerateMembers to false for items you don't need (labels, etc). It's not a specifically Visual-Studio thing, more related to the platform, but mixed with the contextual list of objects and functions, it just clears up so much clutter.

- 16,256
- 15
- 86
- 137
This applies to winform projects.
Instead of opening the form in design mode by default, you can configure VS to open the code editor instead. This is configured by right-clicking on a form in the solution explorer and choosing the "Open with" option. This gives you a dialog that allows you to specify the default option when double-clicking on a file.

- 11,296
- 3
- 28
- 47
When designing a form:
View > Tab Order
Allows you you specify and control your TabIndexes easily (much more so than setting them by hand!)

- 16,256
- 15
- 86
- 137
Its all about Resharper ;) Gives you tons of shortcuts which are so useful I can no longer work without them. I don't get on with the intellisense though, so I've turned that off.
This is incredibly useful, allows you to write underscores with the space bar when writing long test method names.

- 36,616
- 34
- 155
- 231
Un-Bold Brace Matching
Tools > Options
Environment > Fonts and Colors
Display items: Brace Matching (Hilight)
uncheck Bold

- 56,055
- 78
- 209
- 280
Find and Replace window’s "Search Hidden Text" checkbox.
It's not really a preference but it is indispensable. It sure is frustrating when you don’t notice that it "magically" unchecked itself.

- 13,749
- 1
- 16
- 10
Besides, Line Numbers, the first thing I always do in a newly-installed IDE is set the Edit.GoToDefinition
keyboard shortcut.
Tools > Options > Keyboard

- 27,113
- 11
- 60
- 86