mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-06-13 07:10:26 +08:00
Terminal sample steps 2-4
This commit is contained in:
7
terminal-sample/.vscode/extensions.json
vendored
Normal file
7
terminal-sample/.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"eg2.tslint"
|
||||
]
|
||||
}
|
||||
9
terminal-sample/.vscode/settings.json
vendored
9
terminal-sample/.vscode/settings.json
vendored
@ -1,10 +1,3 @@
|
||||
// Place your settings in this file to overwrite default and user settings.
|
||||
{
|
||||
"files.exclude": {
|
||||
"out": false // set this to true to hide the "out" folder with the compiled JS files
|
||||
},
|
||||
"search.exclude": {
|
||||
"out": true // set this to false to include "out" folder in search results
|
||||
},
|
||||
"typescript.tsdk": "./node_modules/typescript/lib" // we want to use the TS server from our node_modules folder to control its version
|
||||
"editor.insertSpaces": false
|
||||
}
|
||||
@ -1,3 +1,32 @@
|
||||
# vscode-terminal-api-example
|
||||
|
||||
This repo demonstrates how to utilize the integrated terminal extension API. It targets VS Code v1.23, for earlier versions check the git history.
|
||||
This sample provides several commands that demonstrates how to utilize the integrated terminal extension API. Access the commands through the command palette (F1).
|
||||
|
||||

|
||||
|
||||
## VS Code API
|
||||
|
||||
### `vscode` module
|
||||
|
||||
- [window.createTerminal](https://vscode-ext-docs.azurewebsites.net/api/references/vscode-api#window.createTerminal)
|
||||
- [window.onDidChangeActiveTerminal](https://vscode-ext-docs.azurewebsites.net/api/references/vscode-api#window.onDidChangeActiveTerminal)
|
||||
- [window.onDidCloseTerminal](https://vscode-ext-docs.azurewebsites.net/api/references/vscode-api#window.onDidCloseTerminal)
|
||||
- [window.onDidOpenTerminal](https://vscode-ext-docs.azurewebsites.net/api/references/vscode-api#window.onDidOpenTerminal)
|
||||
- [window.Terminal](https://vscode-ext-docs.azurewebsites.net/api/references/vscode-api#window.Terminal)
|
||||
- [window.terminals](https://vscode-ext-docs.azurewebsites.net/api/references/vscode-api#window.terminals)
|
||||
|
||||
### Proposed API
|
||||
|
||||
- `window.createTerminalRenderer`
|
||||
- `window.TerminalRenderer`
|
||||
|
||||
### Contribution Points
|
||||
|
||||
- [`contributes.commands`](https://code.visualstudio.com/docs/extensionAPI/extension-points#_contributescommands)
|
||||
|
||||
## Running the Sample
|
||||
|
||||
- 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
|
||||
- Run the extension in a new VS Code window
|
||||
|
||||
BIN
terminal-sample/demo.png
Normal file
BIN
terminal-sample/demo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
2490
terminal-sample/package-lock.json
generated
Normal file
2490
terminal-sample/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user