Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samverschueren/vscode-set-text
An easy-to-use VS Code `#setText()` method
https://github.com/samverschueren/vscode-set-text
Last synced: 3 months ago
JSON representation
An easy-to-use VS Code `#setText()` method
- Host: GitHub
- URL: https://github.com/samverschueren/vscode-set-text
- Owner: SamVerschueren
- License: mit
- Created: 2015-11-26T20:15:24.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-06-14T00:37:27.000Z (7 months ago)
- Last Synced: 2024-10-12T01:08:44.840Z (3 months ago)
- Language: TypeScript
- Size: 2.93 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- awesome-vscode-cn - vscode-set-text - An easy-to-use VS Code `#setText()` method. (Libraries / [Shades of Purple by Ahmad Awais](https://vscodethemes.com/e/ahmadawais.shades-of-purple))
- -awesome-vscode - vscode-set-text - An easy-to-use VS Code `#setText()` method. (Libraries / [Niketa Theme by Dejan Toteff](https://vscodethemes.com/e/selfrefactor.niketa-theme))
- awesome-vscode - vscode-set-text - An easy-to-use VS Code `#setText()` method. (Libraries / [Niketa Theme by Dejan Toteff](https://vscodethemes.com/e/selfrefactor.niketa-theme))
- awesome-vscode-zh - vscode-set-text
README
# vscode-set-text
> An easy-to-use VS Code `#setText()` method
## Install
```
$ npm install --save vscode-set-text
```## Usage
```js
import setText from 'vscode-set-text';setText('new text');
```## API
### setText(text, [editor])
Returns a promise.
#### text
Type: `string`
Text you want to set in the editor
#### editor
Type: `vscode.TextEditor`
Default: `window.activeTextEditor`Editor to set the text in.
## License
MIT © [Sam Verschueren](http://github.com/SamVerschueren)