Partager via


IVsLanguageLineIndent Interface

Definition

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

public interface class IVsLanguageLineIndent
public interface class IVsLanguageLineIndent
__interface IVsLanguageLineIndent
[System.Runtime.InteropServices.Guid("E5A25E79-4A3C-4FCB-B375-196F5E8D1B2D")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsLanguageLineIndent
[System.Runtime.InteropServices.Guid("E5A25E79-4A3C-4FCB-B375-196F5E8D1B2D")]
[System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)]
public interface IVsLanguageLineIndent
[<System.Runtime.InteropServices.Guid("E5A25E79-4A3C-4FCB-B375-196F5E8D1B2D")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsLanguageLineIndent = interface
[<System.Runtime.InteropServices.Guid("E5A25E79-4A3C-4FCB-B375-196F5E8D1B2D")>]
[<System.Runtime.InteropServices.InterfaceType(System.Runtime.InteropServices.ComInterfaceType.InterfaceIsIUnknown)>]
type IVsLanguageLineIndent = interface
Public Interface IVsLanguageLineIndent
Attributes

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.

Methods

GetIndentPosition(IVsTextLayer, Int32, Int32)

Determines how many "spaces" to add at the start of a line.

Applies to