IEditorOperations2 接口

Defines operations relating to the editor.

命名空间:  Microsoft.VisualStudio.Text.Operations
程序集:  Microsoft.VisualStudio.Text.UI(在 Microsoft.VisualStudio.Text.UI.dll 中)

语法

声明
Public Interface IEditorOperations2 _
    Inherits IEditorOperations
public interface IEditorOperations2 : IEditorOperations
public interface class IEditorOperations2 : IEditorOperations
type IEditorOperations2 =  
    interface 
        interface IEditorOperations 
    end
public interface IEditorOperations2 extends IEditorOperations

IEditorOperations2 类型公开以下成员。

属性

  名称 说明
公共属性 CanCut 确定是否可以执行剪切操作。 (继承自 IEditorOperations。)
公共属性 CanDelete 确定是否可以执行删除操作。 (继承自 IEditorOperations。)
公共属性 CanPaste 确定是否可以执行粘贴操作。 (继承自 IEditorOperations。)
公共属性 Options 获取特定于此视图的选项。 (继承自 IEditorOperations。)
公共属性 ProvisionalCompositionSpan 如果没有临时组合,则),获取当前临时组合范围或 nullnull 引用(在 Visual Basic 中为 Nothing) 。 (继承自 IEditorOperations。)
公共属性 SelectedText 获取选定文本。 (继承自 IEditorOperations。)
公共属性 TextView 获取对其执行这些操作的文本视图。 (继承自 IEditorOperations。)

页首

方法

  名称 说明
公共方法 AddAfterTextBufferChangePrimitive 对于在重做时将选定内容还原为当前状态的缓冲区,向该缓冲区的 ITextUndoHistory 添加一个 ITextUndoPrimitive。 (继承自 IEditorOperations。)
公共方法 AddBeforeTextBufferChangePrimitive 对于在撤消时将选定内容还原为当前状态的缓冲区,向该缓冲区的 ITextUndoHistory 添加一个 ITextUndoPrimitive。 (继承自 IEditorOperations。)
公共方法 Backspace 删除当前脱字号左侧的一个字符。 (继承自 IEditorOperations。)
公共方法 Capitalize 将选定内容中的所有字符转换为小写字符,然后将选定内容中每个单词的第一个字符转换为大写字符。如果选定内容为空,则将下一字符转换为大写字符。 (继承自 IEditorOperations。)
公共方法 ConvertSpacesToTabs 空格转换为制表符在所选选项,,或者,如果选定内容为空,则号所在的行。 (继承自 IEditorOperations。)
公共方法 ConvertTabsToSpaces 将选项转换为选定内容的空间,则,或者,如果选定内容为空,则号所在的行。 (继承自 IEditorOperations。)
公共方法 CopySelection 将选定文本复制到剪贴板。 (继承自 IEditorOperations。)
公共方法 CutFullLine 如果存在选定内容,则删除选定内容涉及的所有行 (包括换行符),并将文本复制到剪贴板。否则,删除脱字号所在的行(包括换行符),并将文本复制到剪贴板。 (继承自 IEditorOperations。)
公共方法 CutSelection 剪切选定文本。 (继承自 IEditorOperations。)
公共方法 DecreaseLineIndent 如果选定内容包含多个行,则移除选定内容中每一行的缩进;否则移除脱字号所在的行的缩进。 (继承自 IEditorOperations。)
公共方法 Delete ,如果有一个,删除选定内容。如果没有选定内容,则删除缓冲区中的下一个字符,如果存在)。 (继承自 IEditorOperations。)
公共方法 DeleteBlankLines 删除选定内容中所有的空行或仅包含空格的行。 (继承自 IEditorOperations。)
公共方法 DeleteFullLine 如果存在选定内容,则删除选定内容涉及的所有行(包括换行符)。否则,删除脱字号所在的行(包括换行符)。 (继承自 IEditorOperations。)
公共方法 DeleteHorizontalWhiteSpace 删除选定行开头和末尾的所有空格,并剪裁内部空格。 (继承自 IEditorOperations。)
公共方法 DeleteToBeginningOfLine 删除脱字号所在的行,最多删除到上一换行符和选定内容(如果有)。 (继承自 IEditorOperations。)
公共方法 DeleteToEndOfLine 删除脱字号所在的行,最多删除到换行符和选定内容(如果有)。 (继承自 IEditorOperations。)
公共方法 DeleteWordToLeft 删除当前脱字号位置左侧的字。 (继承自 IEditorOperations。)
公共方法 DeleteWordToRight 删除当前脱字号位置右侧的字。 (继承自 IEditorOperations。)
公共方法 ExtendSelection 到指定的位置扩展当前选择范围。 (继承自 IEditorOperations。)
公共方法 GetWhitespaceForVirtualSpace 获取组成的字符串受要插入填补特定 VirtualSnapshotPoint 和最接近的 SnapshotPoint 之间的空白在同一行的空白字符。 (继承自 IEditorOperations。)
公共方法 GotoLine 将脱字号移至指定行的开头。 (继承自 IEditorOperations。)
公共方法 IncreaseLineIndent 如果选定内容包含多个行,则向选定内容中的每一行添加缩进,否则向脱字号所在的行添加缩进。 (继承自 IEditorOperations。)
公共方法 Indent 如果选定内容包含多个行,则缩进选定内容,否则在脱字号位置插入一个制表符。 (继承自 IEditorOperations。)
公共方法 InsertFile 个文件的内容在磁盘上为文本缓冲区中的插入。 (继承自 IEditorOperations。)
公共方法 InsertNewLine 在当前脱字号位置插入一个新行。 (继承自 IEditorOperations。)
公共方法 InsertProvisionalText 在当前脱字号位置插入给定文本,作为临时文本。 (继承自 IEditorOperations。)
公共方法 InsertText 在当前脱字号位置插入给定文本。 (继承自 IEditorOperations。)
公共方法 InsertTextAsBox 插入指定的文本在当前脱字号位置以一个框。 (继承自 IEditorOperations。)
公共方法 MakeLowercase 将选定内容中的大写字母转换为小写字母。如果选定内容为空,则将下一字符转换为小写字符。 (继承自 IEditorOperations。)
公共方法 MakeUppercase 将选定内容中的小写字母转换为大写字母。如果选定内容为空,则将下一字符转换为大写字符。 (继承自 IEditorOperations。)
公共方法 MoveCaret 将脱字号移至给定行在特定偏移量。 (继承自 IEditorOperations。)
公共方法 MoveCurrentLineToBottom 将当前行移至视图底部。 (继承自 IEditorOperations。)
公共方法 MoveCurrentLineToTop 将当前行移至视图顶部。 (继承自 IEditorOperations。)
公共方法 MoveLineDown 将脱字号下移一行。 (继承自 IEditorOperations。)
公共方法 MoveLineUp 将脱字号上移一行。 (继承自 IEditorOperations。)
公共方法 MoveSelectedLinesDown Moves the selected lines below the line bordering the selection on the bottom. Moving down from the bottom of the file will return true, however no changes will be made. Collapsed regions being moved, and being moved over, will remain collapsed. Moves involving readonly regions will result in no changes being made.
公共方法 MoveSelectedLinesUp Moves the selected lines up above the line bordering the selection on top. Moving up from the top of the file returns true, but no changes are made. Collapsed regions being moved, and being moved over, remain collapsed. Moves involving read-only regions result in no changes being made.
公共方法 MoveToBottomOfView 将脱字号移至视图中最后一个完全可见的行。 (继承自 IEditorOperations。)
公共方法 MoveToEndOfDocument 移动文档末尾的脱字号。 (继承自 IEditorOperations。)
公共方法 MoveToEndOfLine 将脱字号移至行尾。 (继承自 IEditorOperations。)
公共方法 MoveToHome 将脱字号移至行中的第一个文本列。 (继承自 IEditorOperations。)
公共方法 MoveToLastNonWhiteSpaceCharacter 将脱字号移至恰好位于行中最后一个非空格字符之前的位置。 (继承自 IEditorOperations。)
公共方法 MoveToNextCharacter 将脱字号移至下一字符。 (继承自 IEditorOperations。)
公共方法 MoveToNextWord 将脱字号移至下一字。 (继承自 IEditorOperations。)
公共方法 MoveToPreviousCharacter 将脱字号移至上一字符。 (继承自 IEditorOperations。)
公共方法 MoveToPreviousWord 将脱字号移至上一字。 (继承自 IEditorOperations。)
公共方法 MoveToStartOfDocument 将脱字号移至文档开头。 (继承自 IEditorOperations。)
公共方法 MoveToStartOfLine 将脱字号移至行首。 (继承自 IEditorOperations。)
公共方法 MoveToStartOfLineAfterWhiteSpace 将脱字号移至行的第一个非空白字符。 (继承自 IEditorOperations。)
公共方法 MoveToStartOfNextLineAfterWhiteSpace 将脱字号移至下一行的第一个非空白字符。 (继承自 IEditorOperations。)
公共方法 MoveToStartOfPreviousLineAfterWhiteSpace 将脱字号移至上一行的第一个非空白字符。 (继承自 IEditorOperations。)
公共方法 MoveToTopOfView 将脱字号移至视图中第一个完全可见的行。 (继承自 IEditorOperations。)
公共方法 NormalizeLineEndings 替换不与指定字符串匹配的所有行尾。 (继承自 IEditorOperations。)
公共方法 OpenLineAbove 在脱字号所在的行的开头插入一个新行。 (继承自 IEditorOperations。)
公共方法 OpenLineBelow 在脱字号所在的行的末尾插入一个新行。 (继承自 IEditorOperations。)
公共方法 PageDown 将脱字号下移一页。 (继承自 IEditorOperations。)
公共方法 PageUp 将脱字号上移一页。 (继承自 IEditorOperations。)
公共方法 Paste 将剪贴板中的文本粘贴到文本缓冲区。 (继承自 IEditorOperations。)
公共方法 ReplaceAllMatches 替换给定字符串的所有匹配项。 (继承自 IEditorOperations。)
公共方法 ReplaceSelection 以指定文本替换文本选择。 (继承自 IEditorOperations。)
公共方法 ReplaceText 以指定文本替换从指定的文本。 (继承自 IEditorOperations。)
公共方法 ResetSelection 重置文本中的任何选定内容。 (继承自 IEditorOperations。)
公共方法 ScrollColumnLeft 将视图向左滚动一列。 (继承自 IEditorOperations。)
公共方法 ScrollColumnRight 将视图向右滚动一列。 (继承自 IEditorOperations。)
公共方法 ScrollDownAndMoveCaretIfNecessary ,如果脱字号已滚出页面,由一行将视图向下滚动并将脱字号重新定位到视图中第一个完全可见的行。 (继承自 IEditorOperations。)
公共方法 ScrollLineBottom 滚动脱字号所在的行,以使该行成为视图中最后一个完全可见的行。 (继承自 IEditorOperations。)
公共方法 ScrollLineCenter 滚动脱字号所在的行,以使该行位于视图居中位置。 (继承自 IEditorOperations。)
公共方法 ScrollLineTop 滚动脱字号所在的行,因此,该行成为视图中第一个完全可见的行。 (继承自 IEditorOperations。)
公共方法 ScrollPageDown 将视图向下滚动一页,而不移动脱字号。 (继承自 IEditorOperations。)
公共方法 ScrollPageUp 将视图向上滚动一页,而不移动脱字号。 (继承自 IEditorOperations。)
公共方法 ScrollUpAndMoveCaretIfNecessary 将视图向上滚动一行,并将脱字号重新定位到视图中最后一个完全可见的行(如果脱字号已滚出页面)。 (继承自 IEditorOperations。)
公共方法 SelectAll 选择所有文本。 (继承自 IEditorOperations。)
公共方法 SelectAndMoveCaret(VirtualSnapshotPoint, VirtualSnapshotPoint) 从给定选择定位点到活动点,将脱字号移至新的选定内容的活动点。选定大小将变得可见。 (继承自 IEditorOperations。)
公共方法 SelectAndMoveCaret(VirtualSnapshotPoint, VirtualSnapshotPoint, TextSelectionMode) 从指定的中选择定位点到活动点,将脱字号移至新的活动点选定内容并确保选定内容中指定的选择模式和使选定的范围可见。 (继承自 IEditorOperations。)
公共方法 SelectAndMoveCaret(VirtualSnapshotPoint, VirtualSnapshotPoint, TextSelectionMode, Nullable<EnsureSpanVisibleOptions>) 从给定选择定位点到活动点,将脱字号移至新的选定内容的活动点。,以确保选择指定的选择模式并使下选定大小可见。 (继承自 IEditorOperations。)
公共方法 SelectCurrentWord 选择当前字。 (继承自 IEditorOperations。)
公共方法 SelectEnclosing 选择封闭父级。 (继承自 IEditorOperations。)
公共方法 SelectFirstChild 选择第一个子级。 (继承自 IEditorOperations。)
公共方法 SelectLine 选择指定的行。 (继承自 IEditorOperations。)
公共方法 SelectNextSibling 选择下一个同级。 (继承自 IEditorOperations。)
公共方法 SelectPreviousSibling 选择上一个同级。 (继承自 IEditorOperations。)
公共方法 SwapCaretAndAnchor 将脱字号从其当前位置交换到选定内容的另一端。 (继承自 IEditorOperations。)
公共方法 Tabify 将选定内容和脱字号涉及的所有行中的前导空格转换为制表符。 (继承自 IEditorOperations。)
公共方法 ToggleCase 切换选定内容中每个字符的大小写。如果选定内容为空,则更改下一字符的大小写。 (继承自 IEditorOperations。)
公共方法 TransposeCharacter 转置光标处的字符及下一字符。 (继承自 IEditorOperations。)
公共方法 TransposeLine 转置光标所在的行及下一行。 (继承自 IEditorOperations。)
公共方法 TransposeWord 转置当前单词及下一单词。 (继承自 IEditorOperations。)
公共方法 Unindent 取消对文本。 (继承自 IEditorOperations。)
公共方法 Untabify 转换驱动的空白转换为选定内容和脱字号涉及的所有行留出空间。 (继承自 IEditorOperations。)
公共方法 ZoomIn 放大文本视图按比例因子 10%。 (继承自 IEditorOperations。)
公共方法 ZoomOut 在文本视图按比例因子 10% 缩小。 (继承自 IEditorOperations。)
公共方法 ZoomTo 将指定的缩放级别向文本视图。 (继承自 IEditorOperations。)

页首

请参阅

参考

Microsoft.VisualStudio.Text.Operations 命名空间