Did you know… what’s the difference between smart indenting and block indenting? – #101

Smart, Block, and No indenting options

Smart indenting is the option you want provided you want the cursor to be properly indented whenever you press enter or arrow up and down through the code.  An example is when you create a new method called foo(), then hit enter.  You’ll notice the cursor will automatically indent itself.  If you continue to hit enter, the cursor will remain indented.  Not all languages support this smart indenting, but if it does, this should be the default setting for that language.

Block indenting is similar to a document editor.  The difference here is when you type in foo() and hit enter, only that first new line is automatically indented.  The next newline places the cursor at column 0.

None will not indent any new lines.  You will have to indent everything manually.

Technorati tags: VS2005Tip, VS2008Tip

Did you know… How to reach the Navigation bar via the keyboard? – #100

At the very top of the editor and just below the File Tab Channel, you’ll find the Navigation Bar.  The left combo box lists objects and the right lists the select objects members.  This is very useful when you need to jump to various functions throughout a large solution, or you want to see what functions an object has (or is missing).

Navigation Bar

To jump to the navigation bar via the keyboard, press Ctrl+F2.  This is bound to the command Window.MoveToNavigationBar, so your keyboard shortcut mileage may vary. To toggle between the Objects list and the Members list, press Tab or Shift+Tab. 

Additionally, you can hide (or show) the navigation bar by going to Tools – Options – Text Editor – All Languages – General and setting the Navigation bar option to the desired setting.  Note that since this is found in All Languages, you can customize this for any listed language under the Text Editor node.

Display Navigation Bar Option

Technorati tags: VS2005Tip, VS2008Tip

Did you know… How to change the Brace Matching color? – #099

A previous tip talked about what that automatic delimiter highlighting option does.  A follow-up tip is how to change the Brace Matching color.

Brace Matching in Neon Green color

Go to Tools – Options – Fonts and Colors, select Brace Matching (Rectangle), and set to the desired color.

Brace Matching selecting neon green (lime)

I like bright green.  Must be Seattle’s weather getting to me.

Technorati tags: VS2005Tip, VS2008Tip

Did you know… How to turn off Intellisense by default – #098

Just in case you ever need to do this…

Go to Tools – Options – Text Editor – All Languages – General and uncheck Auto List Members and Parameter Information.  If you just want to disable intellisense by default for a particular language, go to the Text Editor – <language> – General option page and set the behavior there.

statement completion options unchecked

Note that the intellisense commands themselves are not disabled, meaning you can still invoke intellisense via the keyboard shortcut or a toolbar button.

Technorati tags: VS2005Tip, VS2008Tip