Files

37 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2018-06-15 16:47:11 +02:00
# QuickInput Sample
This is a sample extension that shows the QuickInput UI and usage of the QuickInput API.
It is not intended as a production quality extension.
- Open the command palette
- Run "Quick Input Samples"
- Pick one of the samples and see it run
2019-09-10 15:05:39 -07:00
## Demo
2021-02-22 09:58:22 -08:00
![Multi-step sample](https://raw.githubusercontent.com/Microsoft/vscode-extension-samples/main/quickinput-sample/preview.gif)
2018-06-15 16:47:11 +02:00
2019-09-10 15:05:39 -07:00
## How it works
2018-06-15 16:47:11 +02:00
- The extension uses the [`QuickPick`](https://code.visualstudio.com/api/references/vscode-api#QuickPick) and [`InputBox`](https://code.visualstudio.com/api/references/vscode-api#InputBox) API to show a UI for user input.
2019-09-10 15:05:39 -07:00
- Registers a command via `package.json` that will trigger the quick input
## VS Code API
### `vscode` module
- [`QuickPick`](https://code.visualstudio.com/api/references/vscode-api#QuickPick)
- [`InputBox`](https://code.visualstudio.com/api/references/vscode-api#InputBox)
- [`window.createQuickPick`](https://code.visualstudio.com/api/references/vscode-api#window.createQuickPick)
- [`window.showQuickPick`](https://code.visualstudio.com/api/references/vscode-api#window.showQuickPick)
- [`window.createInputBox`](https://code.visualstudio.com/api/references/vscode-api#window.createInputBox)
- [`window.showInputBox`](https://code.visualstudio.com/api/references/vscode-api#window.showInputBox)
2018-06-15 16:47:11 +02:00
# How to run locally
2019-09-10 15:05:39 -07:00
- Run `npm install` in terminal to install dependencies
- Run the `Run Extension` target in the Debug View. This will:
- Start a task `npm: watch` to compile the code
2021-02-22 09:58:22 -08:00
- Run the extension in a new VS Code window