IEditorOperations Interface

Defines operations relating to the editor.

Namespace:  Microsoft.VisualStudio.Text.Operations
Assembly:  Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)

type IEditorOperations =  interface end

The IEditorOperations type exposes the following members.

  NameDescription
Public propertyCanCutDetermines whether a cut operation is possible.
Public propertyCanDeleteDetermines whether a delete operation is possible.
Public propertyCanPasteDetermines whether a paste operation is possible.
Public propertyOptionsGets the options specific to this view.
Public propertyProvisionalCompositionSpanGets the span of the current provisional composition, or a null reference (Nothing in Visual Basic) if there is no provisional composition).
Public propertySelectedTextGets the selected text.
Public propertyTextViewGets the text view on which these operations work.
Top

  NameDescription
Public methodAddAfterTextBufferChangePrimitiveAdds an ITextUndoPrimitive to the ITextUndoHistory for the buffer that will revert the selection to the current state when it is redone.
Public methodAddBeforeTextBufferChangePrimitiveAdds an ITextUndoPrimitive to the ITextUndoHistory for the buffer that will revert the selection to the current state when it is undone.
Public methodBackspaceDeletes a character to the left of the current caret.
Public methodCapitalizeConverts 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.
Public methodConvertSpacesToTabsConverts spaces to tabs in the selection, or, if the selection is empty, on the line the caret is on.
Public methodConvertTabsToSpacesConverts tabs to spaces in the selection, or, if the selection is empty, on the line the caret is on.
Public methodCopySelectionCopies the selected text to the clipboard.
Public methodCutFullLineIf 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.
Public methodCutSelectionCuts the selected text.
Public methodDecreaseLineIndentIf there is a multi-line selection, removes indentation from every line in the selection, otherwise removes indentation from the line the caret is on.
Public methodDeleteDeletes the selection if there is one. If there is no selection, deletes the next character in the buffer if one exists.
Public methodDeleteBlankLinesDeletes all empty lines or lines that contain only white space in the selection.
Public methodDeleteFullLineIf 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.
Public methodDeleteHorizontalWhiteSpaceDeletes all white space from the beginnings and ends of the selected lines, and trims internal white space.
Public methodDeleteToBeginningOfLineDeletes the line the caret is on, up to the previous line break character and the selection, if present.
Public methodDeleteToEndOfLineDeletes the line the caret is on, up to the line break character and the selection, if present.
Public methodDeleteWordToLeftDeletes the word to the left of the current caret position.
Public methodDeleteWordToRightDeletes the word to the right of the current caret position.
Public methodExtendSelectionExtends the current selection span to the specified position.
Public methodGetWhitespaceForVirtualSpaceGets 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.
Public methodGotoLineMoves the caret to the start of the specified line.
Public methodIncreaseLineIndentIf there is a multi-line selection, adds indentation to every line in the selection, otherwise adds indentation to the line the caret is on.
Public methodIndentIf there is a multi-line selection indents the selection, otherwise inserts a tab at the caret location.
Public methodInsertFileInserts the contents of a file on disk into the text buffer.
Public methodInsertNewLineInserts a new line at the current caret position.
Public methodInsertProvisionalTextInserts the given text at the current caret position as provisional text.
Public methodInsertTextInserts the given text at the current caret position.
Public methodInsertTextAsBoxInserts the specified text at the current caret position as a box.
Public methodMakeLowercaseConverts uppercase letters to lowercase in the selection. If the selection is empty, makes the next character lowercase.
Public methodMakeUppercaseConverts lowercase letters to uppercase in the selection. If the selection is empty, makes the next character uppercase.
Public methodMoveCaretMoves the caret to the given line at the given offset.
Public methodMoveCurrentLineToBottomMoves the current line to the bottom of the view.
Public methodMoveCurrentLineToTopMoves the current line to the top of the view.
Public methodMoveLineDownMoves the caret one line down.
Public methodMoveLineUpMoves the caret one line up.
Public methodMoveToBottomOfViewMoves the caret to the last fully-visible line of the view.
Public methodMoveToEndOfDocumentMoves the caret at the end of the document.
Public methodMoveToEndOfLineMoves the caret to the end of the line.
Public methodMoveToHomeMoves the caret to the first text column on the line.
Public methodMoveToLastNonWhiteSpaceCharacterMoves the caret to just before the last non-white space character in the line.
Public methodMoveToNextCharacterMoves the caret to the next character.
Public methodMoveToNextWordMoves the caret to the next word.
Public methodMoveToPreviousCharacterMoves the caret to the previous character.
Public methodMoveToPreviousWordMoves the caret to the previous word.
Public methodMoveToStartOfDocumentMoves the caret to the start of the document.
Public methodMoveToStartOfLineMoves the caret to the start of the line.
Public methodMoveToStartOfLineAfterWhiteSpaceMoves the caret to the first non-whitespace character of the line.
Public methodMoveToStartOfNextLineAfterWhiteSpaceMoves the caret to the first non-whitespace character in the next line.
Public methodMoveToStartOfPreviousLineAfterWhiteSpaceMoves the caret to the first non-whitespace character on the previous line.
Public methodMoveToTopOfViewMoves the caret to the first fully-visible line of the view.
Public methodNormalizeLineEndingsReplaces all the line endings that do not match the specified string.
Public methodOpenLineAboveInserts a new line at the start of the line the caret is on.
Public methodOpenLineBelowInserts a new line at the end of the line the caret is on.
Public methodPageDownMoves the caret one page down.
Public methodPageUpMoves the caret one page up.
Public methodPastePastes text from the clipboard to the text buffer.
Public methodReplaceAllMatchesReplaces all matching occurrences of the given string.
Public methodReplaceSelectionReplaces the text selection with the specified text.
Public methodReplaceTextReplaces text from the specified span with the specified text.
Public methodResetSelectionResets any selection in the text.
Public methodScrollColumnLeftScrolls the view one column to the left.
Public methodScrollColumnRightScrolls the view one column to the right.
Public methodScrollDownAndMoveCaretIfNecessaryScrolls 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.
Public methodScrollLineBottomScrolls the line the caret is on, so that it is the last fully-visible line in the view.
Public methodScrollLineCenterScrolls the line the caret is on, so that it is centered in the view.
Public methodScrollLineTopScrolls the line the caret is on, so that it is the first fully-visible line in the view.
Public methodScrollPageDownScrolls the view down a page without moving the caret.
Public methodScrollPageUpScrolls the view up a page without moving the caret.
Public methodScrollUpAndMoveCaretIfNecessaryScrolls 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.
Public methodSelectAllSelects all text.
Public methodSelectAndMoveCaret(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.
Public methodSelectAndMoveCaret(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.
Public methodSelectAndMoveCaret(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.
Public methodSelectCurrentWordSelects the current word.
Public methodSelectEnclosingSelects the enclosing parent.
Public methodSelectFirstChildSelects the first child.
Public methodSelectLineSelects the specified line.
Public methodSelectNextSiblingSelects the next sibling.
Public methodSelectPreviousSiblingSelects the previous sibling.
Public methodSwapCaretAndAnchorSwaps the caret from its current position to the other end of the selection.
Public methodTabifyConverts the leading white space to tabs on all lines touched by the selection and caret.
Public methodToggleCaseSwitches the case of each character in the selection. If the selection is empty, changes the case of the next character.
Public methodTransposeCharacterTransposes the character at the cursor with the next character.
Public methodTransposeLineTransposes the line containing the cursor with the next line.
Public methodTransposeWordTransposes the current word with the next one.
Public methodUnindentUnindents the text.
Public methodUntabifyConverts the leading whitespace to spaces on all lines touched by the selection and the caret.
Public methodZoomInZooms in to the text view by a scaling factor of 10%.
Public methodZoomOutZooms out of the text view by a scaling factor of 10%.
Public methodZoomToApplies the specified zoom level to the text view.
Top

You can get this interface by importing an IEditorOperationsFactoryService.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft