I had three goals for this plugin:
- Learn more about the service we just acquired. I’ve been using Cloudup as a user for a couple weeks and I got to meet the wonderful Cloudup team last week in San Francisco. However, I don’t know much about their product from a developer standpoint. Working on this project allowed me to learn more about streams, items, and their dev APIs.
- Make it extremely easy to share code from Sublime. I was teaching a PHP course a couple weeks ago and found myself sharing snippets over Skype. This would have been OK if it wasn’t for some of the formatting getting messed up when someone would copy and paste it in a file. I figured if I had an easy way to copy a snippet and get a shareable URL, we would avoid this problem and it would improve my workflow for sharing files/snippets in general. Teaching that class was how this idea was born.
I think I succeeded in all three goals. I understand a lot more about Cloudup. I feel pretty confident with Python and feel like I could tackle a few more small projects without running into trouble. I also made a fully functional sharing plugin for Sublime.
SublimeCloudup allows you to share the currently opened file, the current selection (snippet), or multiple files.
You can grab the plugin at https://github.com/justinshreve/SublimeCloudup
I’ll be working on getting it added to the package manager soon. Until then, the README contains installation directions.
The code is open source so feel free to change, adapt, and redistribute the plugin. If you have any feature requests or see any bugs pull requests are welcome.