Multi Selection Replace
Replace all the selections of text with the result of a JavaScript expression.
Usage
- Select the text that you want to replace (you can creat multiple selectors holding down Alt while clicking with the mouse)
- Press Ctrl + Alt + M on Windows, Cmd + Alt + M on Mac
- Provide a JavaScript expression in the input box at the top of the screen. You can use:
e : to reference the current element
i : to reference the current index
a : to reference the whole array of selections
- Press Enter
Examples
Increasing sequence
Using JavaScript expression i+1 ...

Increasing sequence (2nd example)
Using JavaScript expression e+1 ...

Fibonacci sequence
Using JavaScript expression a[i] = i < 2 ? i : a[i] = a[i-2] + a[i-1] ...

Source Code
Github repository with the source code here.
1.0.0
Initial release.
| |