VS Code Clipboard Splitter Extension
This extension allows you to split clipboard content by a newline and insert it into the active editor using snippets.
Features
- Split Clipboard Content: Automatically splits clipboard content into two parts based on a newline.
- Insert Snippets: Inserts predefined snippets into the editor based on the split clipboard content.
Commands
The extension provides the following commands:
- Split Clipboard and Insert Snippet: Splits clipboard content and inserts a snippet in the format
{{ \\$t('part1' /* part2 */) }} .
- Split Clipboard and Insert Snippet (Variant 2): Inserts a snippet in the format
\\$t('part1' /* part2 */) .
- Split Clipboard and Insert Snippet (Variant 3): Inserts a snippet in the format
this.\\$t('part1' /* part2 */) .
These commands are accessible via the Command Palette (Ctrl+Shift+P ) after installing the extension.
Installation
You can install the extension from the Visual Studio Code Marketplace:
- Open VS Code.
- Go to the Extensions view (
Ctrl+Shift+X ).
- Search for "VS Code Clipboard Splitter".
- Click Install.
Usage
- Copy two lines of text to your clipboard.
- Open the Command Palette (
Ctrl+Shift+P ).
- Search for one of the commands listed above (e.g., "Split Clipboard and Insert Snippet").
- Select the command to insert the snippet based on the clipboard content.
Example
Suppose you copy the following text to your clipboard:
By running the "Split Clipboard and Insert Snippet" command, it will insert the snippet {{ \\$t('key1' /* value1 */) }} into your active editor.
| |