Online HDL IDE supports multi-cursor

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Online HDL IDE supports multi-cursor

DaveAZ
I just discovered this feature by trying it.  It's a feature in VS Code and other modern code editors.

When you're doing the long list of gates to build a Not16 from sixteen Not gates, for example,
you can first copy one Not line, and then copy/ paste to create sixteen of them

Not(in=in[0], out=out[0]);
Not(in=in[0], out=out[0]);
Not(in=in[0], out=out[0]);
Not(in=in[0], out=out[0]);
  and so on..

Then go to the second line where the index values should be 1's

Place the cursor after the first zero,

and then hold down the Alt key and click after the second zero on that line,

the editor will show two blinking cursors, one at the end of each zero.

Now if yoiu press the backspace key once and then type a '1' it'll replace all three 0's
with 1's.

More generally, whatever you type happens all all the current multi-cursor locations,
so if you sent a cursor someplace and then hold down the Alt key, then any place you click
will add more cursors.

It would be better if the HDL language supporte some kind of FOR loop but the multi-cursor
at least makes editing the lines a bit quicker.

Dave