An edit script contains a list of find and replace operations that, when applied to an original file, produce a modified file.
Since an edit script doesn’t modify the original file directly but allows you to export the result, there’s no risk of replacing many occurrences only to find out later that some replacements didn’t work as intended: you can just correct the edit script and apply it again to the original file.
If you need to replace text in multiple files, instead of manually repeating the same operations manually in a text editor, just apply the edit script to each file.
Format
An edit script is a JSON file with the following structure:
{
"rules" : [
{
"find" : "apple",
"findMode" : "text",
"replace" : "banana"
}
]
}
findMode
can be text
or regularExpression
.