vscode-set-selected-text

An easy-to-use VSCode setSelectedText() method to replace the selected text

Downloads
15
Stars
0

vscode-set-selected-text

An easy-to-use VS Code #setSelectedText() method

Install

$ npm install --save vscode-set-selected-text

Usage

import setSelectedText from 'vscode-set-selected-text';

setSelectedText('new text');

API

setSelectedText(text, [editor])

Returns a promise.

text: string

Type: string

Text you want to set in the editor

editor: vscode.TextEditor

Editor to set the text in. This will be window.activeTextEditor if you omit.

License

MIT © Shogo Sensui

Package Rankings
Top 29.64% on Npmjs.org