IVsLanguageLineIndent Interface

Determines the number of "spaces" that should be added to the beginning of the specified line.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)

Syntax

声明
<GuidAttribute("E5A25E79-4A3C-4FCB-B375-196F5E8D1B2D")> _
<InterfaceTypeAttribute()> _
Public Interface IVsLanguageLineIndent
[GuidAttribute("E5A25E79-4A3C-4FCB-B375-196F5E8D1B2D")]
[InterfaceTypeAttribute()]
public interface IVsLanguageLineIndent
[GuidAttribute(L"E5A25E79-4A3C-4FCB-B375-196F5E8D1B2D")]
[InterfaceTypeAttribute()]
public interface class IVsLanguageLineIndent
[<GuidAttribute("E5A25E79-4A3C-4FCB-B375-196F5E8D1B2D")>]
[<InterfaceTypeAttribute()>]
type IVsLanguageLineIndent =  interface end
public interface IVsLanguageLineIndent

The IVsLanguageLineIndent type exposes the following members.

Methods

  Name Description
Public method GetIndentPosition Determines how many "spaces" to add at the start of a line.

Top

Remarks

Typically used by the core editor or editor emulators such as Emacs, this interface is used to support "smart" indenting and determines where to position the caret after the user types Enter to insert a new line.

Notes to Implementers

This interface is implemented on the same object that implements the IVsLanguageTextOps interface. Implement the IVsLanguageLineIndent interface if you need precise control over where the caret is to be positioned on a new line. For example, if the user types Enter after an open brace in C++ or C#, a new line is entered and the caret is positioned one tab stop in relative to the open brace.

Notes to Callers

Obtain this interface from the IVsLanguageTextOps interface by calling the QueryInterface method (C++) or by casting the IVsLanguageTextOps interface to an IVsLanguageLineIndent interface (C#, Visual Basic). Typically this interface is looked for only if the indenting style is set to vsIndentStyleSmart. If this interface cannot be obtained, use other methods to simulate smart indenting.

See Also

Reference

Microsoft.VisualStudio.TextManager.Interop Namespace