- 编辑器
- Visual Studio Code 基础
- 安装Visual Studio Code
- VS Code 扩展市场 VS Code Extension Marketplace
- 通过任务集成外部工具 Integrate with External Tools via Tasks
- 调试
- Why Visual Studio Code? - 为什么选用VSCode
- 版本控制(Version Control)
- Accessibility 易用性
- Editing Evolved - 与时俱进的编辑体验
- 定制化
- 定制化Visual Studio Code(Customize Visual Studio Code)
- 用户和工作区设置(User and Workspace Settings)
- VS Code 的快捷按键(Key Bindings for Visual Studio Code)
- 向 VSC 添加代码段(Adding Snippets to Visual Studio Code)
- Color Themes - 颜色主题
- Display Language - 语言区域
- 工具
- vsce - Publishing Tool Reference
- Yo Code - Extension Generator
- VS Code Extension Samples
- 技术支持
- Visual Studio Code FAQ
- Common Error Cases
- 如何升级到最新版 How to update to the latest release
- Requirements for Visual Studio Code
- 扩展
- Visual Studio Code 扩展 Extending Visual Studio Code
- 示例 - Hello World Example - Hello World
- 示例 - 单词数统计 Example - Word Count
- 示例 - 语言服务 Example - Language Server
- 示例 - 调试器 Example - Debuggers
- Running and Debugging Your Extension
- 安装扩展
- Extensibility Principles and Patterns
- Testing Your Extension
- Our Approach to Extensibility
- 扩展API
- 可扩展性参考
- 扩展清单文件 - package.json
- Contribution Points - package.json
- Activation Events - package.json
- vscode namespace API
- Complex Commands API
- Debugging API
- 语言
- 语言 Languages
- JavaScript
- 用C#进行工作 Working with C#
- C/C++ for VS Code (预览)(Preview)
- JSON
- VS Code对HTML的相关 HTML Programming in VS Code
- VS Code中的PHP编程 PHP Programming in VS Code
- VS Code 对 Python 的支持
- Markdown and VS Code - Markdown与VS Code
- Editing TypeScript
- CSS, Sass and Less
- 使用Docker工作
- 运行时
- Node.js Applications with VS Code
- ASP.NET Core with VS Code
- Unity Development with VS Code
- Office Add-ins with VS Code
- 开始(Getting Started)
Complex Commands API
This document lists a set of complex commands that we consider stable. They are called complex commands because they require parameters and often return a value. You can use the commands in conjunction with the executeCommand
API.
The following is a sample of how to preview a HTML document:
let uri = Uri.parse('file:///some/path/to/file.html');
let success = await commands.executeCommand('vscode.previewHtml', uri);
Commands
vscode.executeWorkspaceSymbolProvider
- Execute all workspace symbol provider.
- query Search string
- (returns) A promise that resolves to an array of SymbolInformation-instances.
vscode.executeDefinitionProvider
- Execute all definition provider.
- uri Uri of a text document
- position Position of a symbol
- (returns) A promise that resolves to an array of Location-instances.
vscode.executeHoverProvider
- Execute all hover provider.
- uri Uri of a text document
- position Position of a symbol
- (returns) A promise that resolves to an array of Hover-instances.
vscode.executeDocumentHighlights
- Execute document highlight provider.
- uri Uri of a text document
- position Position in a text document
- (returns) A promise that resolves to an array of DocumentHighlight-instances.
vscode.executeReferenceProvider
- Execute reference provider.
- uri Uri of a text document
- position Position in a text document
- (returns) A promise that resolves to an array of Location-instances.
vscode.executeDocumentRenameProvider
- Execute rename provider.
- uri Uri of a text document
- position Position in a text document
- newName The new symbol name
- (returns) A promise that resolves to a WorkspaceEdit.
vscode.executeSignatureHelpProvider
- Execute signature help provider.
- uri Uri of a text document
- position Position in a text document
- (returns) A promise that resolves to SignatureHelp.
vscode.executeDocumentSymbolProvider
- Execute document symbol provider.
- uri Uri of a text document
- (returns) A promise that resolves to an array of SymbolInformation-instances.
vscode.executeCompletionItemProvider
- Execute completion item provider.
- uri Uri of a text document
- position Position in a text document
- (returns) A promise that resolves to a CompletionList-instance.
vscode.executeCodeActionProvider
- Execute code action provider.
- uri Uri of a text document
- range Range in a text document
- (returns) A promise that resolves to an array of CompletionItem-instances.
vscode.executeCodeLensProvider
- Execute completion item provider.
- uri Uri of a text document
- (returns) A promise that resolves to an array of Commands.
vscode.executeFormatDocumentProvider
- Execute document format provider.
- uri Uri of a text document
- options Formatting options
- (returns) A promise that resolves to an array of TextEdits.
vscode.executeFormatRangeProvider
- Execute range format provider.
- uri Uri of a text document
- range Range in a text document
- options Formatting options
- (returns) A promise that resolves to an array of TextEdits.
vscode.executeFormatOnTypeProvider
- Execute document format provider.
- uri Uri of a text document
- position Position in a text document
- ch Character that got typed
- options Formatting options
- (returns) A promise that resolves to an array of TextEdits.
vscode.previewHtml
- Preview an html document.
- uri Uri of the document to preview.
- column (optional) Column in which to preview.
editor.action.showReferences
- Show references at a position in a file
- uri The text document in which to show references
- position The position at which to show
- locations An array of locations.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论