Home > database >  Find and Append feature in JetBrains/VSCode
Find and Append feature in JetBrains/VSCode

Time:12-06

Is there some way to append something to a search result in JetBrains IDEs or VSCode?

Usually I'd use find and replace and just copy the old result and append things but now I am using regex search over multiple files and I need to add a line to all the results.

Usually using find and replace you'll get something like this: Find and replace

So instead of replacing the search result I want my input to be added the search result. Find and add This should be useful when using RegEx to edit multiple lines that have things in common.
In my case I was looking to add a field to all my enums that are like:

public enum EnumName {
   // field1
   // field2...
}

To be like :

public enum EnumName {
   // default field
   // field1
   // field2...
}

CodePudding user response:

Thanks to @LazyOne replies, I've been able to find a way to do what I am looking for by using Find and append using RegEx

  • Related