Multinsert
A VS Code extension for inserting generated data into multiple cursors or selections.
Supports sequences, random values, and a wide range of data types.
Usage
- Select multiple lines or place multiple cursors
- Press
Ctrl+Shift+I (Mac: Cmd+Shift+I)
- Pick a data type and mode from the quick pick menu
- Fill in the parameters and press
Enter
Data Types
int
| Mode |
Input |
Example output |
| sequence |
start:step |
1:2 → 1, 3, 5, 7 |
| random |
min:max |
1:100 → 42, 7, 83 |
float
| Mode |
Input |
Example output |
| sequence |
start:step:decimal |
0:0.5:2 → 0.00, 0.50, 1.00 |
| random |
min:max:decimal |
0:1:4 → 0.3821, 0.7163 |
string
| Mode |
Input |
Example output |
| sequence |
pattern with {n} |
item-{n} → item-1, item-2 |
| random |
minLength:maxLength:charset |
4:8:alphanumeric → aB3k, xZ9mRt |
Available charsets: alpha, numeric, alphanumeric, hex, or any custom character string.
boolean
| Mode |
Input |
Example output |
| sequence |
true or false (start value) |
true → true, false, true, false |
| random |
(no input) |
true, false, true, true |
uuid
| Mode |
Input |
Example output |
| random |
(no input) |
a1b2c3d4-e5f6-4… |
color
| Mode |
Input |
Example output |
| sequence |
startHex:hueStep |
#FF0000:30 → #ff0000, #ff8000, #ffff00 |
| random |
(no input) |
#3a7fc1, #e84d2b |
Output format is controlled by multinsert.color.format: hex (default), rgb, or hsl.
email
| Mode |
Input |
Example output |
| sequence |
pattern with {n} |
user{n}@example.com → user1@example.com |
| random |
domain |
example.com → quick.fox42@example.com |
ipv4
| Mode |
Input |
Example output |
| sequence |
startIP:step |
192.168.0.1:1 → 192.168.0.1, 192.168.0.2 |
| random |
(no input) |
172.43.18.201 |
ipv6
| Mode |
Input |
Example output |
| sequence |
startIP step (space-separated) |
::1 1 → 0000:…:0001, 0000:…:0002 |
| random |
(no input) |
3f2a:0b1c:… |
IPv6 sequence uses a space separator between the address and step to avoid ambiguity with colons.
datetime
| Mode |
Input |
Example output |
| sequence |
start step (space-separated) |
2024-01-01 1d → 2024/01/01, 2024/01/02 |
| random |
start~end |
2020-01-01~2024-12-31 → 2022/07/15 |
Step units: y, m, w, d, h, min, s
Output format is controlled by multinsert.datetime.format.
| Token |
Output |
YYYY |
4-digit year (e.g. 2024) |
YY |
2-digit year (e.g. 24) |
MM |
Month with zero-pad (01–12) |
M |
Month without zero-pad (1–12) |
DD |
Day with zero-pad (01–31) |
D |
Day without zero-pad (1–31) |
HH |
Hour 24h with zero-pad |
H |
Hour 24h without zero-pad |
hh |
Hour 12h with zero-pad |
h |
Hour 12h without zero-pad |
mm |
Minute with zero-pad |
m |
Minute without zero-pad |
ss |
Second with zero-pad |
s |
Second without zero-pad |
[text] |
Literal text (e.g. [T] → T) |
Insertion Position
Controlled by multinsert.position:
| Value |
Behaviour |
replace (default) |
Replace selected text (or insert at cursor) |
prefix |
Insert before the line content |
suffix |
Insert after the line content |
Settings
General
| Setting |
Type |
Default |
Description |
multinsert.position |
string |
"replace" |
Where to insert the value |
int
| Setting |
Type |
Default |
Description |
multinsert.int.sequence.start |
number |
1 |
Starting integer |
multinsert.int.sequence.step |
number |
1 |
Increment |
multinsert.int.sequence.format |
string |
"" |
Zero-pad format (e.g. "000") |
multinsert.int.random.min |
number |
0 |
Min value |
multinsert.int.random.max |
number |
100 |
Max value |
float
| Setting |
Type |
Default |
Description |
multinsert.float.sequence.start |
number |
0 |
Starting float |
multinsert.float.sequence.step |
number |
0.1 |
Increment |
multinsert.float.sequence.decimal |
number |
2 |
Decimal places |
multinsert.float.random.min |
number |
0 |
Min value |
multinsert.float.random.max |
number |
1 |
Max value |
multinsert.float.random.decimal |
number |
2 |
Decimal places |
string
| Setting |
Type |
Default |
Description |
multinsert.string.sequence.pattern |
string |
"item-{n}" |
Pattern with {n} |
multinsert.string.random.minLength |
number |
8 |
Min length |
multinsert.string.random.maxLength |
number |
8 |
Max length |
multinsert.string.random.charset |
string |
"alphanumeric" |
Character set |
boolean
| Setting |
Type |
Default |
Description |
multinsert.boolean.sequence.start |
boolean |
true |
Starting value |
color
| Setting |
Type |
Default |
Description |
multinsert.color.sequence.start |
string |
"#FF0000" |
Starting hex color |
multinsert.color.sequence.step |
number |
30 |
Hue increment (degrees) |
multinsert.color.format |
string |
"hex" |
Output format: hex, rgb, hsl |
email
| Setting |
Type |
Default |
Description |
multinsert.email.sequence.pattern |
string |
"user{n}@example.com" |
Pattern with {n} |
multinsert.email.random.domain |
string |
"example.com" |
Domain |
ipv4
| Setting |
Type |
Default |
Description |
multinsert.ipv4.sequence.start |
string |
"192.168.0.1" |
Starting address |
multinsert.ipv4.sequence.step |
number |
1 |
Increment |
ipv6
| Setting |
Type |
Default |
Description |
multinsert.ipv6.sequence.start |
string |
"::1" |
Starting address |
multinsert.ipv6.sequence.step |
number |
1 |
Increment |
datetime
| Setting |
Type |
Default |
Description |
multinsert.datetime.sequence.start |
string |
"" |
Start date (empty = today) |
multinsert.datetime.sequence.step |
string |
"1d" |
Step (e.g. 1d, 2w, 1m) |
multinsert.datetime.random.start |
string |
"" |
Range start (empty = 2020-01-01) |
multinsert.datetime.random.end |
string |
"" |
Range end (empty = today) |
multinsert.datetime.format |
string |
"YYYY/MM/DD HH:mm:ss" |
Output format |
Keybinding
| Platform |
Key |
Command |
| Windows / Linux |
Ctrl+Shift+I |
Multinsert: Insert |
| Mac |
Cmd+Shift+I |
Multinsert: Insert |
| |