Share via


Text Manager in Visual Studio

Visual Studio notifies various components of the Visual Studio core editor about any changes that are made to global settings. For example, when you specify a global preference for the appearance or behavior of a component in the core editor, such as its document data object, the text manager stores this information and communicates it to all affected clients.

If your VSPackage implements an instance of the core editor, your VSPackage must monitor these global preferences. If changes that were made to the core editor affect your instance of the editor, it must then act accordingly.

Text Manager Functions

The text manager provides a central location for core editor implementations to retrieve information and global preferences such as:

  • Whether a buffer is under source code control.

  • How to register for file-change notifications.

  • How to keep track of which views are associated with certain buffers.

  • Text colorization preferences.

  • Tab versus space preferences.

Preferences that are unique to a given language are not managed by the text manager. These settings must be managed by each language service.

Event notification for the text manager is provided by using the IVsTextManagerEvents interface. Implement this interface on your client object to receive notification of changes to the text manager. Expose this interface to the text view by using the IConnectionPointContainer interface on the text manager to receive notification of line changes from the manager.

See Also

Other Resources

Core Editor

Editor Features