다음을 통해 공유


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

‘선언
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
Public property CanCut Determines whether a cut operation is possible.
Public property CanDelete Determines whether a delete operation is possible.
Public property CanPaste Determines whether a paste operation is possible.
Public property Options Gets the options specific to this view.
Public property ProvisionalCompositionSpan Gets the span of the current provisional composition, or nulla null reference (Nothing in Visual Basic) if there is no provisional composition).
Public property SelectedText Gets the selected text.
Public property TextView Gets the text view on which these operations work.

Top

Methods

  Name Description
Public method AddAfterTextBufferChangePrimitive Adds an ITextUndoPrimitive to the ITextUndoHistory for the buffer that will revert the selection to the current state when it is redone.
Public method AddBeforeTextBufferChangePrimitive Adds an ITextUndoPrimitive to the ITextUndoHistory for the buffer that will revert the selection to the current state when it is undone.
Public method Backspace Deletes a character to the left of the current caret.
Public method 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.
Public method ConvertSpacesToTabs Converts spaces to tabs in the selection, or, if the selection is empty, on the line the caret is on.
Public method ConvertTabsToSpaces Converts tabs to spaces in the selection, or, if the selection is empty, on the line the caret is on.
Public method CopySelection Copies the selected text to the clipboard.
Public method 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.
Public method CutSelection Cuts the selected text.
Public method 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.
Public method Delete Deletes the selection if there is one. If there is no selection, deletes the next character in the buffer if one exists.
Public method DeleteBlankLines Deletes all empty lines or lines that contain only white space in the selection.
Public method 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.
Public method DeleteHorizontalWhiteSpace Deletes all white space from the beginnings and ends of the selected lines, and trims internal white space.
Public method DeleteToBeginningOfLine Deletes the line the caret is on, up to the previous line break character and the selection, if present.
Public method DeleteToEndOfLine Deletes the line the caret is on, up to the line break character and the selection, if present.
Public method DeleteWordToLeft Deletes the word to the left of the current caret position.
Public method DeleteWordToRight Deletes the word to the right of the current caret position.
Public method ExtendSelection Extends the current selection span to the specified position.
Public method 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.
Public method GotoLine Moves the caret to the start of the specified line.
Public method 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.
Public method Indent If there is a multi-line selection indents the selection, otherwise inserts a tab at the caret location.
Public method InsertFile Inserts the contents of a file on disk into the text buffer.
Public method InsertNewLine Inserts a new line at the current caret position.
Public method InsertProvisionalText Inserts the given text at the current caret position as provisional text.
Public method InsertText Inserts the given text at the current caret position.
Public method InsertTextAsBox Inserts the specified text at the current caret position as a box.
Public method MakeLowercase Converts uppercase letters to lowercase in the selection. If the selection is empty, makes the next character lowercase.
Public method MakeUppercase Converts lowercase letters to uppercase in the selection. If the selection is empty, makes the next character uppercase.
Public method MoveCaret Moves the caret to the given line at the given offset.
Public method MoveCurrentLineToBottom Moves the current line to the bottom of the view.
Public method MoveCurrentLineToTop Moves the current line to the top of the view.
Public method MoveLineDown Moves the caret one line down.
Public method MoveLineUp Moves the caret one line up.
Public method MoveToBottomOfView Moves the caret to the last fully-visible line of the view.
Public method MoveToEndOfDocument Moves the caret at the end of the document.
Public method MoveToEndOfLine Moves the caret to the end of the line.
Public method MoveToHome Moves the caret to the first text column on the line.
Public method MoveToLastNonWhiteSpaceCharacter Moves the caret to just before the last non-white space character in the line.
Public method MoveToNextCharacter Moves the caret to the next character.
Public method MoveToNextWord Moves the caret to the next word.
Public method MoveToPreviousCharacter Moves the caret to the previous character.
Public method MoveToPreviousWord Moves the caret to the previous word.
Public method MoveToStartOfDocument Moves the caret to the start of the document.
Public method MoveToStartOfLine Moves the caret to the start of the line.
Public method MoveToStartOfLineAfterWhiteSpace Moves the caret to the first non-whitespace character of the line.
Public method MoveToStartOfNextLineAfterWhiteSpace Moves the caret to the first non-whitespace character in the next line.
Public method MoveToStartOfPreviousLineAfterWhiteSpace Moves the caret to the first non-whitespace character on the previous line.
Public method MoveToTopOfView Moves the caret to the first fully-visible line of the view.
Public method NormalizeLineEndings Replaces all the line endings that do not match the specified string.
Public method OpenLineAbove Inserts a new line at the start of the line the caret is on.
Public method OpenLineBelow Inserts a new line at the end of the line the caret is on.
Public method PageDown Moves the caret one page down.
Public method PageUp Moves the caret one page up.
Public method Paste Pastes text from the clipboard to the text buffer.
Public method ReplaceAllMatches Replaces all matching occurrences of the given string.
Public method ReplaceSelection Replaces the text selection with the specified text.
Public method ReplaceText Replaces text from the specified span with the specified text.
Public method ResetSelection Resets any selection in the text.
Public method ScrollColumnLeft Scrolls the view one column to the left.
Public method ScrollColumnRight Scrolls the view one column to the right.
Public method 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.
Public method ScrollLineBottom Scrolls the line the caret is on, so that it is the last fully-visible line in the view.
Public method ScrollLineCenter Scrolls the line the caret is on, so that it is centered in the view.
Public method ScrollLineTop Scrolls the line the caret is on, so that it is the first fully-visible line in the view.
Public method ScrollPageDown Scrolls the view down a page without moving the caret.
Public method ScrollPageUp Scrolls the view up a page without moving the caret.
Public method 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.
Public method SelectAll Selects all text.
Public method 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.
Public method 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.
Public method 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.
Public method SelectCurrentWord Selects the current word.
Public method SelectEnclosing Selects the enclosing parent.
Public method SelectFirstChild Selects the first child.
Public method SelectLine Selects the specified line.
Public method SelectNextSibling Selects the next sibling.
Public method SelectPreviousSibling Selects the previous sibling.
Public method SwapCaretAndAnchor Swaps the caret from its current position to the other end of the selection.
Public method Tabify Converts the leading white space to tabs on all lines touched by the selection and caret.
Public method ToggleCase Switches the case of each character in the selection. If the selection is empty, changes the case of the next character.
Public method TransposeCharacter Transposes the character at the cursor with the next character.
Public method TransposeLine Transposes the line containing the cursor with the next line.
Public method TransposeWord Transposes the current word with the next one.
Public method Unindent Unindents the text.
Public method Untabify Converts the leading whitespace to spaces on all lines touched by the selection and the caret.
Public method ZoomIn Zooms in to the text view by a scaling factor of 10%.
Public method ZoomOut Zooms out of the text view by a scaling factor of 10%.
Public method ZoomTo Applies the specified zoom level to the text view.

Top

Remarks

You can get this interface by importing an IEditorOperationsFactoryService.

See Also

Reference

Microsoft.VisualStudio.Text.Operations Namespace