Version 1.3
- Add the ability to apply regex sequences right before a file save event. Files are targeted with user defined file patterns.
Just add the on save sequences to reg_replace.sublime-settings
You can create as many on save sequences as you want, and they can all target different files. If a file matches multiple sequences, then the sequences will be strung together as one sequence.
Included example. **on_save ** is turned off by default.
// If on_save is true, RegReplace will search through the file patterns listed below right before a file is saved,
// if the file name matches a file pattern, the sequence will be applied before the file is saved.
// RegReplace will apply all sequences that apply to a given file in the order they appear below.
"on_save": true,
"on_save_sequences":
// An example on_save_sequence that targets all files and trims trailing spaces
// - file_pattern: an array of file patterns that must match for the sequence to be applied
// - sequence: an array of replacement definitions to be applied on saving the file
{"file_pattern": "*"], "sequence": "remove_trailing_spaces"]}
],