One more small update
Version 1.4
- Allow on save regex sequences to define target files with regex as well as unix file name pattern matching
- Add example âremove_dangling_commasâ replacement definition
- Add example on_save sequence using file regex pattern to remove dangling commas from sublime json files
Decided to allow âon_save_sequencesâ to use unix file name pattern matching and/or regex (you can use either or both).
Example:
"on_save_sequences":
// An example on_save event that removes dangling commas from json files
// - file_regex: an array of regex strings that must match the file for the sequence to be applied
// - case: regex case sensitivity (true|false) false is default (this setting is optional)
// - 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_regex": ".*\\.sublime-(settings|commands|menu|keymap|mousemap|theme|build|project|completions|commands)"],
"file_pattern": "*.json"],
"sequence": "remove_json_dangling_commas"]
},