Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gko/wrap
📦 vscode extension to wrap selection with symbols/pattern
https://github.com/gko/wrap
selection symbols vscode vscode-extension wrap
Last synced: 3 months ago
JSON representation
📦 vscode extension to wrap selection with symbols/pattern
- Host: GitHub
- URL: https://github.com/gko/wrap
- Owner: gko
- License: mit
- Created: 2017-11-22T19:02:25.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T01:32:00.000Z (about 2 years ago)
- Last Synced: 2024-10-24T06:30:54.153Z (4 months ago)
- Topics: selection, symbols, vscode, vscode-extension, wrap
- Language: TypeScript
- Homepage:
- Size: 7.18 MB
- Stars: 14
- Watchers: 4
- Forks: 9
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Wrap selection
This plugin allows you to wrap one or multiple selections with symbol/combination of symbols.
You can find it in [marketplace](https://marketplace.visualstudio.com/items?itemName=konstantin.wrapSelection)## Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter:
```bash
ext install konstantin.wrapSelection
```## Usage
Select something → ctrl+shift+P → «Wrap selected text»
or
press ', ", «, ], < or ) — both opening or closing symbol would work
![features](https://github.com/gko/wrap/raw/master/features.gif)
### Predefined patterns
Through «Wrap selected text» you can also use multiple symbols, i.e.:
- `{{` → `{{text}}`
- ``
- `<%` → `<%text%>`### Custom user patterns
![user patterns](https://github.com/gko/wrap/raw/master/userDefined.gif)You can also do custom patterns through your settings:
``` json
{
"wrapSelection.patterns": {
"log": "console.log(`${text}`, ${text})",
"promise": "new Promise((yeah, nah) => yeah(${text}))",
"=>": "() => ${text}"
}
}
```And then you can do ctrl+shift+P → «Wrap selected text» → log:
```js
selection
```
will become
```js
console.log(`selection`, selection);
```## Found a bug?
Create a ticket [here](https://github.com/gko/wrap/issues)
or insult me at mail[at]konstantin[dot]io