Ernie Peters
Ernie Peters

Reputation: 697

Vim regex equivalent in vs code

In Vim I can use :g/^\s*T\y A to copy all lines starting with T in a file to register a, then paste it to wherever I need it from said register. How can I, or what is the equivalent regex to do the same in Visual Studio Code? Be mindful that I am NOT fluent with regex and two days new to VS Code. Thanks for your help in advance.

Upvotes: 1

Views: 878

Answers (1)

Mark
Mark

Reputation: 181238

I don't think you can copy to multiple registers like that in VSCode unless someone has an extension to do it. Otherwise, one at a time you can:

Put ^\s*T.*$ in the search field

ALT-Enter will select all occurences of those matches

CTRL-C to copy to clipboard

Then paste to where you want it.

Upvotes: 1

Related Questions