IEditorOperations Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines operations relating to the editor.
public interface class IEditorOperations
public interface class IEditorOperations
__interface IEditorOperations
public interface IEditorOperations
type IEditorOperations = interface
Public Interface IEditorOperations
- Derived
Remarks
You can get this interface by importing an IEditorOperationsFactoryService.
Properties
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 (null if there is no provisional composition). |
SelectedText |
Gets the selected text. |
TextView |
Gets the text view on which these operations work. |
Methods
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 on the line the caret is on if the selection is empty. |
ConvertTabsToSpaces() |
Converts tabs to spaces in the selection, or on the line the caret is on if the selection is empty. |
CopySelection() |
Copies the selected text to the clipboard. |
CutFullLine() |
If there is a selection present, deletes all 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, or 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(Int32) |
Extends the current selection span to the new selection end. |
GetWhitespaceForVirtualSpace(VirtualSnapshotPoint) |
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(Int32) |
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(String) |
Inserts a file on disk into the text buffer. |
InsertNewLine() |
Inserts a new line at the current caret position. |
InsertProvisionalText(String) |
Inserts the given text at the current caret position as provisional text. |
InsertText(String) |
Inserts the given text at the current caret position. |
InsertTextAsBox(String, VirtualSnapshotPoint, VirtualSnapshotPoint) |
Inserts the given 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(ITextViewLine, Double, Boolean) |
Moves the caret to the given |
MoveCurrentLineToBottom() |
Moves the current line to the bottom of the view. |
MoveCurrentLineToTop() |
Moves the current line to the top of the view. |
MoveLineDown(Boolean) |
Moves the caret one line down. |
MoveLineUp(Boolean) |
Moves the caret one line up. |
MoveToBottomOfView(Boolean) |
Moves the caret to the last fully-visible line of the view. |
MoveToEndOfDocument(Boolean) |
Moves the caret at the end of the document. |
MoveToEndOfLine(Boolean) |
Moves the caret to the end of the line. |
MoveToHome(Boolean) |
Moves the caret to the first text column on the line; if the caret is already at the first text column or there is no text, move the caret to the first column on the line. |
MoveToLastNonWhiteSpaceCharacter(Boolean) |
Moves the caret to just before the last non-white space character in the line. |
MoveToNextCharacter(Boolean) |
Moves the caret to the next character. |
MoveToNextWord(Boolean) |
Moves the caret to the next word. |
MoveToPreviousCharacter(Boolean) |
Moves the caret to the previous character. |
MoveToPreviousWord(Boolean) |
Moves the caret to the previous word. |
MoveToStartOfDocument(Boolean) |
Moves the caret to the start of the document. |
MoveToStartOfLine(Boolean) |
Moves the caret to the first column on the current line. |
MoveToStartOfLineAfterWhiteSpace(Boolean) |
Moves the caret to the start of the line after all white space. |
MoveToStartOfNextLineAfterWhiteSpace(Boolean) |
Moves the caret to the start of the next line after all white space. |
MoveToStartOfPreviousLineAfterWhiteSpace(Boolean) |
Moves the caret to the start of the previous line after all white space. |
MoveToTopOfView(Boolean) |
Moves the caret to the first fully-visible line of the view. |
NormalizeLineEndings(String) |
Replaces all line endings that do not match |
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(Boolean) |
Moves the caret one page down. |
PageUp(Boolean) |
Moves the caret one page up. |
Paste() |
Pastes text from the clipboard to the text buffer. |
ReplaceAllMatches(String, String, Boolean, Boolean, Boolean) |
Replaces all matching occurrences of the given string. |
ReplaceSelection(String) |
Replaces the text selection with the new text. |
ReplaceText(Span, String) |
Replaces text from the given span with the new 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, if it is scrolled off the page, to the first fully-visible line in the view. |
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() |
Scroll sthe 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, TextSelectionMode, Nullable<EnsureSpanVisibleOptions>) |
Selects from the given anchor point to active point, moving the caret to the new active point of the selection. Additionally, ensure the selection is in the given selection mode, and make the selected span visible. |
SelectAndMoveCaret(VirtualSnapshotPoint, VirtualSnapshotPoint, TextSelectionMode) |
Selects from the given anchor point to active point, moving the caret to the new active point of the selection. Additionally, ensure the selection is in the given selection mode, and make the selected span visible. |
SelectAndMoveCaret(VirtualSnapshotPoint, VirtualSnapshotPoint) |
Selects from the given anchor point to active point, moving the caret to the new active point of the selection. The selected span will be made visible. |
SelectCurrentWord() |
Selects the current word. |
SelectEnclosing() |
Selects the enclosing parent. |
SelectFirstChild() |
Selects the first child. |
SelectLine(ITextViewLine, Boolean) |
Selects the given line. |
SelectNextSibling(Boolean) |
Selects the next sibling. |
SelectPreviousSibling(Boolean) |
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. Transposes the first two characters when the cursor is at the start of the line. Transposes the last two characters when the cursor is at the end of the line. |
TransposeLine() |
Transposes the line containing the cursor with the next line. Transposes the last two lines when the cursor at the last line. |
TransposeWord() |
Transposes the current word with the next one. White space and punctuation are not treated as words. |
Unindent() |
If there is a multi-line selection, unindents the selection. If there is a single line selection, removes up to a tab's worth of white space from before the start of the selection. If there is no selection, removes up to a tab's worth of white space from before the caret position. |
Untabify() |
Converts the leading white space to spaces of all lines touched by the selection and 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(Double) |
Applies the given zoomLevel to the text view |