Skip to content

Instantly share code, notes, and snippets.

@lunaroja
Last active December 21, 2015 21:29
Show Gist options
  • Save lunaroja/6368782 to your computer and use it in GitHub Desktop.
Save lunaroja/6368782 to your computer and use it in GitHub Desktop.
{
"replacements": {
"nbsp": { "find": " ", "replace": " ", "greedy": true, "case": false },
"remove_json_dangling_commas": {
"find": ",([\\r\\n\\s]*)(\\]|\\})",
"replace": "\\1\\2",
"greedy": true,
"scope_filter": ["-string", "-comment"]
},
"remove_trailing_spaces": {
"find": "[ \\t]+$",
"replace": "",
"greedy": true,
"case": true
}
},
"on_save": true,
"on_save_highlight_scope": "invalid",
"on_save_highlight_style": "outline",
"on_save_sequences": [
{"file_regex": [".*\\.sublime-(settings|commands|menu|keymap|mousemap|theme|build|project|completions|commands)"], "file_pattern": ["*.json"], "sequence": ["remove_json_dangling_commas"]},
{"file_pattern": ["*.css"], "sequence": ["apple_css_spaces", "remove_trailing_spaces"]},
{"file_pattern": ["*.html","*.inc"], "sequence": [
"remove_trailing_spaces", "nbsp"
]}
],
"results_in_panel": false,
"multi_pass_max_sweeps": 100,
"find_highlight_color": "invalid",
"find_highlight_style": "outline",
"selection_only": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment