IEditorOperations Interface

 

Defines operations relating to the editor.

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

public interface IEditorOperations

NameDescription
System_CAPS_pubpropertyCanCut

Determines whether a cut operation is possible.

System_CAPS_pubpropertyCanDelete

Determines whether a delete operation is possible.

System_CAPS_pubpropertyCanPaste

Determines whether a paste operation is possible.

System_CAPS_pubpropertyOptions

Gets the options specific to this view.

System_CAPS_pubpropertyProvisionalCompositionSpan

Gets the span of the current provisional composition, or null if there is no provisional composition).

System_CAPS_pubpropertySelectedText

Gets the selected text.

System_CAPS_pubpropertyTextView

Gets the text view on which these operations work.

NameDescription
System_CAPS_pubmethodAddAfterTextBufferChangePrimitive()

Adds an ITextUndoPrimitive to the ITextUndoHistory for the buffer that will revert the selection to the current state when it is redone.

System_CAPS_pubmethodAddBeforeTextBufferChangePrimitive()

Adds an ITextUndoPrimitive to the ITextUndoHistory for the buffer that will revert the selection to the current state when it is undone.

System_CAPS_pubmethodBackspace()

Deletes a character to the left of the current caret.

System_CAPS_pubmethodCapitalize()

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.

System_CAPS_pubmethodConvertSpacesToTabs()

Converts spaces to tabs in the selection, or, if the selection is empty, on the line the caret is on.

System_CAPS_pubmethodConvertTabsToSpaces()

Converts tabs to spaces in the selection, or, if the selection is empty, on the line the caret is on.

System_CAPS_pubmethodCopySelection()

Copies the selected text to the clipboard.

System_CAPS_pubmethodCutFullLine()

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.

System_CAPS_pubmethodCutSelection()

Cuts the selected text.

System_CAPS_pubmethodDecreaseLineIndent()

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.

System_CAPS_pubmethodDelete()

Deletes the selection if there is one. If there is no selection, deletes the next character in the buffer if one exists.

System_CAPS_pubmethodDeleteBlankLines()

Deletes all empty lines or lines that contain only white space in the selection.

System_CAPS_pubmethodDeleteFullLine()

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.

System_CAPS_pubmethodDeleteHorizontalWhiteSpace()

Deletes all white space from the beginnings and ends of the selected lines, and trims internal white space.

System_CAPS_pubmethodDeleteToBeginningOfLine()

Deletes the line the caret is on, up to the previous line break character and the selection, if present.

System_CAPS_pubmethodDeleteToEndOfLine()

Deletes the line the caret is on, up to the line break character and the selection, if present.

System_CAPS_pubmethodDeleteWordToLeft()

Deletes the word to the left of the current caret position.

System_CAPS_pubmethodDeleteWordToRight()

Deletes the word to the right of the current caret position.

System_CAPS_pubmethodExtendSelection(Int32)

Extends the current selection span to the specified position.

System_CAPS_pubmethodGetWhitespaceForVirtualSpace(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.

System_CAPS_pubmethodGotoLine(Int32)

Moves the caret to the start of the specified line.

System_CAPS_pubmethodIncreaseLineIndent()

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.

System_CAPS_pubmethodIndent()

If there is a multi-line selection indents the selection, otherwise inserts a tab at the caret location.

System_CAPS_pubmethodInsertFile(String)

Inserts the contents of a file on disk into the text buffer.

System_CAPS_pubmethodInsertNewLine()

Inserts a new line at the current caret position.

System_CAPS_pubmethodInsertProvisionalText(String)

Inserts the given text at the current caret position as provisional text.

System_CAPS_pubmethodInsertText(String)

Inserts the given text at the current caret position.

System_CAPS_pubmethodInsertTextAsBox(String, VirtualSnapshotPoint, VirtualSnapshotPoint)

Inserts the specified text at the current caret position as a box.

System_CAPS_pubmethodMakeLowercase()

Converts uppercase letters to lowercase in the selection. If the selection is empty, makes the next character lowercase.

System_CAPS_pubmethodMakeUppercase()

Converts lowercase letters to uppercase in the selection. If the selection is empty, makes the next character uppercase.

System_CAPS_pubmethodMoveCaret(ITextViewLine, Double, Boolean)

Moves the caret to the given line at the given offset.

System_CAPS_pubmethodMoveCurrentLineToBottom()

Moves the current line to the bottom of the view.

System_CAPS_pubmethodMoveCurrentLineToTop()

Moves the current line to the top of the view.

System_CAPS_pubmethodMoveLineDown(Boolean)

Moves the caret one line down.

System_CAPS_pubmethodMoveLineUp(Boolean)

Moves the caret one line up.

System_CAPS_pubmethodMoveToBottomOfView(Boolean)

Moves the caret to the last fully-visible line of the view.

System_CAPS_pubmethodMoveToEndOfDocument(Boolean)

Moves the caret at the end of the document.

System_CAPS_pubmethodMoveToEndOfLine(Boolean)

Moves the caret to the end of the line.

System_CAPS_pubmethodMoveToHome(Boolean)

Moves the caret to the first text column on the line.

System_CAPS_pubmethodMoveToLastNonWhiteSpaceCharacter(Boolean)

Moves the caret to just before the last non-white space character in the line.

System_CAPS_pubmethodMoveToNextCharacter(Boolean)

Moves the caret to the next character.

System_CAPS_pubmethodMoveToNextWord(Boolean)

Moves the caret to the next word.

System_CAPS_pubmethodMoveToPreviousCharacter(Boolean)

Moves the caret to the previous character.

System_CAPS_pubmethodMoveToPreviousWord(Boolean)

Moves the caret to the previous word.

System_CAPS_pubmethodMoveToStartOfDocument(Boolean)

Moves the caret to the start of the document.

System_CAPS_pubmethodMoveToStartOfLine(Boolean)

Moves the caret to the start of the line.

System_CAPS_pubmethodMoveToStartOfLineAfterWhiteSpace(Boolean)

Moves the caret to the first non-whitespace character of the line.

System_CAPS_pubmethodMoveToStartOfNextLineAfterWhiteSpace(Boolean)

Moves the caret to the first non-whitespace character in the next line.

System_CAPS_pubmethodMoveToStartOfPreviousLineAfterWhiteSpace(Boolean)

Moves the caret to the first non-whitespace character on the previous line.

System_CAPS_pubmethodMoveToTopOfView(Boolean)

Moves the caret to the first fully-visible line of the view.

System_CAPS_pubmethodNormalizeLineEndings(String)

Replaces all the line endings that do not match the specified string.

System_CAPS_pubmethodOpenLineAbove()

Inserts a new line at the start of the line the caret is on.

System_CAPS_pubmethodOpenLineBelow()

Inserts a new line at the end of the line the caret is on.

System_CAPS_pubmethodPageDown(Boolean)

Moves the caret one page down.

System_CAPS_pubmethodPageUp(Boolean)

Moves the caret one page up.

System_CAPS_pubmethodPaste()

Pastes text from the clipboard to the text buffer.

System_CAPS_pubmethodReplaceAllMatches(String, String, Boolean, Boolean, Boolean)

Replaces all matching occurrences of the given string.

System_CAPS_pubmethodReplaceSelection(String)

Replaces the text selection with the specified text.

System_CAPS_pubmethodReplaceText(Span, String)

Replaces text from the specified span with the specified text.

System_CAPS_pubmethodResetSelection()

Resets any selection in the text.

System_CAPS_pubmethodScrollColumnLeft()

Scrolls the view one column to the left.

System_CAPS_pubmethodScrollColumnRight()

Scrolls the view one column to the right.

System_CAPS_pubmethodScrollDownAndMoveCaretIfNecessary()

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.

System_CAPS_pubmethodScrollLineBottom()

Scrolls the line the caret is on, so that it is the last fully-visible line in the view.

System_CAPS_pubmethodScrollLineCenter()

Scrolls the line the caret is on, so that it is centered in the view.

System_CAPS_pubmethodScrollLineTop()

Scrolls the line the caret is on, so that it is the first fully-visible line in the view.

System_CAPS_pubmethodScrollPageDown()

Scrolls the view down a page without moving the caret.

System_CAPS_pubmethodScrollPageUp()

Scrolls the view up a page without moving the caret.

System_CAPS_pubmethodScrollUpAndMoveCaretIfNecessary()

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.

System_CAPS_pubmethodSelectAll()

Selects all text.

System_CAPS_pubmethodSelectAndMoveCaret(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.

System_CAPS_pubmethodSelectAndMoveCaret(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.

System_CAPS_pubmethodSelectAndMoveCaret(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.

System_CAPS_pubmethodSelectCurrentWord()

Selects the current word.

System_CAPS_pubmethodSelectEnclosing()

Selects the enclosing parent.

System_CAPS_pubmethodSelectFirstChild()

Selects the first child.

System_CAPS_pubmethodSelectLine(ITextViewLine, Boolean)

Selects the specified line.

System_CAPS_pubmethodSelectNextSibling(Boolean)

Selects the next sibling.

System_CAPS_pubmethodSelectPreviousSibling(Boolean)

Selects the previous sibling.

System_CAPS_pubmethodSwapCaretAndAnchor()

Swaps the caret from its current position to the other end of the selection.

System_CAPS_pubmethodTabify()

Converts the leading white space to tabs on all lines touched by the selection and caret.

System_CAPS_pubmethodToggleCase()

Switches the case of each character in the selection. If the selection is empty, changes the case of the next character.

System_CAPS_pubmethodTransposeCharacter()

Transposes the character at the cursor with the next character.

System_CAPS_pubmethodTransposeLine()

Transposes the line containing the cursor with the next line.

System_CAPS_pubmethodTransposeWord()

Transposes the current word with the next one.

System_CAPS_pubmethodUnindent()

Unindents the text.

System_CAPS_pubmethodUntabify()

Converts the leading whitespace to spaces on all lines touched by the selection and the caret.

System_CAPS_pubmethodZoomIn()

Zooms in to the text view by a scaling factor of 10%.

System_CAPS_pubmethodZoomOut()

Zooms out of the text view by a scaling factor of 10%.

System_CAPS_pubmethodZoomTo(Double)

Applies the specified zoom level to the text view.

You can get this interface by importing an IEditorOperationsFactoryService.

Return to top
Show: