IndentingStyle Enumeration
Represents the different indenting styles supported by language services.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Syntax
'宣告
Public Enumeration IndentingStyle
public enum IndentingStyle
Members
Member name | Description | |
---|---|---|
None | Pressing Enter inserts a new line and causes the caret to always move to the beginning of the new line. | |
Block | Pressing Enter inserts a new line and causes the caret to move to the same position as the first non-whitespace character on the previous line. | |
Smart | Pressing Enter inserts a new line and causes the caret to either move to the same position as the first non-whitespace character on the previous line or to indent or outdent automatically depending on the character at the end of the previous line. For example, in C#, pressing Enter after a "{" causes a new line to be inserted and cursor to be indented properly. In addition, the "{" may be moved to its own line. If Enter is pressed after a "}", however, a new line is entered and the caret is moved out one level of indentation. |
Remarks
These styles correspond to the three indenting options available for languages in Visual Studio. These values are returned from the IndentStyle property on the LanguagePreferences object.