IEditorOperations Interface
Defines operations relating to the editor.
Namespace: Microsoft.VisualStudio.Text.Operations
Assembly: Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)
Syntax
'Declaração
Public Interface IEditorOperations
public interface IEditorOperations
public interface class IEditorOperations
type IEditorOperations = interface end
public interface IEditorOperations
The IEditorOperations type exposes the following members.
Properties
Name | Description | |
---|---|---|
CanCut | Determines whether a cut operation is possible. | |
CanDelete | Determines whether a delete operation is possible. | |
CanPaste | Determines whether a paste operation is possible. | |
Options | Gets the options specific to this view. | |
ProvisionalCompositionSpan | Gets the span of the current provisional composition, or nulla null reference (Nothing in Visual Basic) if there is no provisional composition). | |
SelectedText | Gets the selected text. | |
TextView | Gets the text view on which these operations work. |
Top
Methods
Name | Description | |
---|---|---|
AddAfterTextBufferChangePrimitive | Adds an ITextUndoPrimitive to the ITextUndoHistory for the buffer that will revert the selection to the current state when it is redone. | |
AddBeforeTextBufferChangePrimitive | Adds an ITextUndoPrimitive to the ITextUndoHistory for the buffer that will revert the selection to the current state when it is undone. | |
Backspace | Deletes a character to the left of the current caret. | |
Capitalize | Converts all the characters in the selection to lowercase, then converts the first character in each word in the selection to uppercase. If the selection is empty, then it makes the next character uppercase. | |
ConvertSpacesToTabs | Converts spaces to tabs in the selection, or, if the selection is empty, on the line the caret is on. | |
ConvertTabsToSpaces | Converts tabs to spaces in the selection, or, if the selection is empty, on the line the caret is on. | |
CopySelection | Copies the selected text to the clipboard. | |
CutFullLine | If there is a selection, deletes all the lines touched by the selection, including line break characters, and copies the text to the clipboard. Otherwise, deletes the line the caret is on, including the line break characters, and copies the text to the clipboard. | |
CutSelection | Cuts the selected text. | |
DecreaseLineIndent | If there is a multi-line selection, removes indentation from every line in the selection, otherwise removes indentation from the line the caret is on. | |
Delete | Deletes the selection if there is one. If there is no selection, deletes the next character in the buffer if one exists. | |
DeleteBlankLines | Deletes all empty lines or lines that contain only white space in the selection. | |
DeleteFullLine | If there is a selection, deletes all the lines touched by the selection, including line break characters. Otherwise, deletes the line the caret is on, including the line break characters. | |
DeleteHorizontalWhiteSpace | Deletes all white space from the beginnings and ends of the selected lines, and trims internal white space. | |
DeleteToBeginningOfLine | Deletes the line the caret is on, up to the previous line break character and the selection, if present. | |
DeleteToEndOfLine | Deletes the line the caret is on, up to the line break character and the selection, if present. | |
DeleteWordToLeft | Deletes the word to the left of the current caret position. | |
DeleteWordToRight | Deletes the word to the right of the current caret position. | |
ExtendSelection | Extends the current selection span to the specified position. | |
GetWhitespaceForVirtualSpace | Gets a string composed of whitespace characters that would be inserted to fill the gap between a given VirtualSnapshotPoint and the closest SnapshotPoint on the same line. | |
GotoLine | Moves the caret to the start of the specified line. | |
IncreaseLineIndent | If there is a multi-line selection, adds indentation to every line in the selection, otherwise adds indentation to the line the caret is on. | |
Indent | If there is a multi-line selection indents the selection, otherwise inserts a tab at the caret location. | |
InsertFile | Inserts the contents of a file on disk into the text buffer. | |
InsertNewLine | Inserts a new line at the current caret position. | |
InsertProvisionalText | Inserts the given text at the current caret position as provisional text. | |
InsertText | Inserts the given text at the current caret position. | |
InsertTextAsBox | Inserts the specified text at the current caret position as a box. | |
MakeLowercase | Converts uppercase letters to lowercase in the selection. If the selection is empty, makes the next character lowercase. | |
MakeUppercase | Converts lowercase letters to uppercase in the selection. If the selection is empty, makes the next character uppercase. | |
MoveCaret | Moves the caret to the given line at the given offset. | |
MoveCurrentLineToBottom | Moves the current line to the bottom of the view. | |
MoveCurrentLineToTop | Moves the current line to the top of the view. | |
MoveLineDown | Moves the caret one line down. | |
MoveLineUp | Moves the caret one line up. | |
MoveToBottomOfView | Moves the caret to the last fully-visible line of the view. | |
MoveToEndOfDocument | Moves the caret at the end of the document. | |
MoveToEndOfLine | Moves the caret to the end of the line. | |
MoveToHome | Moves the caret to the first text column on the line. | |
MoveToLastNonWhiteSpaceCharacter | Moves the caret to just before the last non-white space character in the line. | |
MoveToNextCharacter | Moves the caret to the next character. | |
MoveToNextWord | Moves the caret to the next word. | |
MoveToPreviousCharacter | Moves the caret to the previous character. | |
MoveToPreviousWord | Moves the caret to the previous word. | |
MoveToStartOfDocument | Moves the caret to the start of the document. | |
MoveToStartOfLine | Moves the caret to the start of the line. | |
MoveToStartOfLineAfterWhiteSpace | Moves the caret to the first non-whitespace character of the line. | |
MoveToStartOfNextLineAfterWhiteSpace | Moves the caret to the first non-whitespace character in the next line. | |
MoveToStartOfPreviousLineAfterWhiteSpace | Moves the caret to the first non-whitespace character on the previous line. | |
MoveToTopOfView | Moves the caret to the first fully-visible line of the view. | |
NormalizeLineEndings | Replaces all the line endings that do not match the specified string. | |
OpenLineAbove | Inserts a new line at the start of the line the caret is on. | |
OpenLineBelow | Inserts a new line at the end of the line the caret is on. | |
PageDown | Moves the caret one page down. | |
PageUp | Moves the caret one page up. | |
Paste | Pastes text from the clipboard to the text buffer. | |
ReplaceAllMatches | Replaces all matching occurrences of the given string. | |
ReplaceSelection | Replaces the text selection with the specified text. | |
ReplaceText | Replaces text from the specified span with the specified text. | |
ResetSelection | Resets any selection in the text. | |
ScrollColumnLeft | Scrolls the view one column to the left. | |
ScrollColumnRight | Scrolls the view one column to the right. | |
ScrollDownAndMoveCaretIfNecessary | Scrolls the view down by one line and repositions the caret to the first fully-visible line in the view, if it is scrolled off the page. | |
ScrollLineBottom | Scrolls the line the caret is on, so that it is the last fully-visible line in the view. | |
ScrollLineCenter | Scrolls the line the caret is on, so that it is centered in the view. | |
ScrollLineTop | Scrolls the line the caret is on, so that it is the first fully-visible line in the view. | |
ScrollPageDown | Scrolls the view down a page without moving the caret. | |
ScrollPageUp | Scrolls the view up a page without moving the caret. | |
ScrollUpAndMoveCaretIfNecessary | Scrolls the view up by one line and repositions the caret, if it is scrolled off the page, to the last fully-visible line in the view. | |
SelectAll | Selects all text. | |
SelectAndMoveCaret(VirtualSnapshotPoint, VirtualSnapshotPoint) | Selects from the given anchor point to the active point, moving the caret to the new active point of the selection. The selected span will be made visible. | |
SelectAndMoveCaret(VirtualSnapshotPoint, VirtualSnapshotPoint, TextSelectionMode) | Selects from the specified anchor point to the active point, moving the caret to the new active point of the selection, and ensuring that the selection is in the specified selection mode, and making the selected span visible. | |
SelectAndMoveCaret(VirtualSnapshotPoint, VirtualSnapshotPoint, TextSelectionMode, Nullable<EnsureSpanVisibleOptions>) | Selects from the given anchor point to active point, moving the caret to the new active point of the selection, ensuring that the selection is in the specified selection mode and making the selected span visible. | |
SelectCurrentWord | Selects the current word. | |
SelectEnclosing | Selects the enclosing parent. | |
SelectFirstChild | Selects the first child. | |
SelectLine | Selects the specified line. | |
SelectNextSibling | Selects the next sibling. | |
SelectPreviousSibling | Selects the previous sibling. | |
SwapCaretAndAnchor | Swaps the caret from its current position to the other end of the selection. | |
Tabify | Converts the leading white space to tabs on all lines touched by the selection and caret. | |
ToggleCase | Switches the case of each character in the selection. If the selection is empty, changes the case of the next character. | |
TransposeCharacter | Transposes the character at the cursor with the next character. | |
TransposeLine | Transposes the line containing the cursor with the next line. | |
TransposeWord | Transposes the current word with the next one. | |
Unindent | Unindents the text. | |
Untabify | Converts the leading whitespace to spaces on all lines touched by the selection and the caret. | |
ZoomIn | Zooms in to the text view by a scaling factor of 10%. | |
ZoomOut | Zooms out of the text view by a scaling factor of 10%. | |
ZoomTo | Applies the specified zoom level to the text view. |
Top
Remarks
You can get this interface by importing an IEditorOperationsFactoryService.