Cmd+Shift+P and type 'jscursor.'
An input field will appear in which you input a function in JS, namely
(Though the third argument is not shown by default because you probably won't use it in your expressions most of the time)
e is the expression that a given cursor is currently highlighting.
i is the index of the cursor in question, and is coherent with the order in which the cursors appear in the document. (for example, for 5 cursors, the topmost one would have index
i = 0, and the bottommost one would have index
i = 4)
The third argument,
values, is an array of the values highlighted by all of the cursors, also in order. So
e == values[i] is a true statement. In other words, for a cursor at index
values[i] will be the expression at that cursor.
In the example given, I have also implemented a custom function (
getDOW) in the extension's configuration (
"getDOW": "i => ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'][(i % 7)]"
None, besides the fact that infinite loops will break the extension and you will have to restart VSCode if this happens.