I have the following problem:
I want to add the same text to multiple files. Specifically, I want to add an extension to a .dart file I'm not sure if there is already a pre-defined way for this in JetBrains' products (maybe not, but Android Studio for example).
class <classname> <add text here> //like in my case extends Class
The process would be
- I select a bunch of files
- I define my text I want to add
- To all the files where it finds
class
it skips the next word and inserts the input.
If you wanted to achieve this without manually copy-pasting, how would you do it?
CodePudding user response:
Thanks @LazyOne
With your suggestion, using the following regex solved the problem
(class)(\s.*)(\{)
replace with
$1$2extends <class>$3