Version 0.2.0
- Add commands to save converted file with specified extension
- For buffer conversion, add setting to open in new buffer
- Allow the turning off of save commands and/or buffer commands
This should satisfy everyone’s desires hopefully.
I have added commands to save the converted content directly with the extension of your choice. I have added an option to open conversions in their own new view buffer if not using the “save to file” commands. You can turn off the commands you don’t want (“save to file” or “show in buffer”). So now you can set the preference you like, and hide commands you don’t like.
This is flexible enough to be applied to any plist or json extension you want, and you can map the converted info to any extension you want. So this, will work with tmTheme, tmLanguages, tmPreferences, and anything else you want to add.
Settings:
[code]{
“json_language”: “Packages/Javascript/JSON.tmLanguage”,
“plist_language”: “Packages/XML/XML.tmLanguage”,
// When converting buffer open conversion in new buffer
"open_in_new_buffer": true,
// Enable show conversion in a view buffer
"enable_show_in_buffer_commands": true,
// Enable creation of new file based on extension map containing the coverted data
// If the current file to convert does not exist on disk, the converted file will default
// To being shown in a view buffer only, and will not be automatcially saved to disk.
"enable_save_to_file_commands": true,
// When saving converted data to a file, or when opening
// conversion in new buffer use these extension maps for file name.
// Extensions will be evaluated in the order listed below.
// If the file does not match any of the extensions, the current
// extension will be replaced with either "plist" or "json" accordingly.
"conversion_ext":
{"plist": "tmLanguage", "json": "tmLanguage.JSON"},
{"plist": "tmPreferences", "json": "tmPreferences.JSON"},
{"plist": "tmTheme", "json": "tmTheme.JSON"}
]
}[/code]
Let me know if you find any bugs or have any suggestions. I will make the request to add this to Package Control sometime soon.