Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Formatting, C#/J#, Text Editor, Options Dialog Box 

Use the Formatting property page dialog box to set options for formatting code in the Code Editor. You can access this dialog box by clicking Options on the Tools menu, expanding Text Editor, expanding C# or Visual J#, and then clicking Formatting.

NoteNote

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

General Settings

The general settings affect how the Code Editor applies formatting options to code.

Label Description

Automatically format completed statement on ;

When selected, formats statements according to the formatting options selected for the Code Editor as soon as you complete the statement. Clear this box if you do not want the Code Editor to alter statements.

Automatically format completed block on }

When selected, formats code blocks according to the formatting options selected for the Code Editor as soon as you complete the code block. Clear this box if you do not want the Code Editor to alter blocks.

Adjust indentation on paste

When selected, formats text pasted into the Code Editor to fit the formatting options selected for the Code Editor. Clear this box if you do not want pasted text to be altered.

Preview Window

The Indentation, New Lines, Spacing, and Wrapping options panes each display a preview window. The preview window shows the effect of each option. To use the preview window, select a formatting option. The preview window shows an example of the selected option. Changing the setting, for example, selecting or clearing a check box, updates the preview window to show the effect of the new setting.

Remarks

Indentation options on the Tabs pages for each language only determine where the Code Editor places the cursor when you press ENTER at the end of a line. Indentation options under Formatting apply when code is formatted automatically, for example, when you paste code into the file while Adjust indentation on paste is selected, and when the block being formatted is typed manually.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft