At our organization we prefer to work, where possible, with files that we can then commit into version control.
With cloud code, our official line is that we work with files in the format set out in the exported zip layout, using the Export function at the bottom left. We then Import the zipped copies of that version controlled directory to get our changes into the preview environment. This theoretically ensures that all work is present in version control, with a proper commit message, as it is tested.
In practice, however, because of the Cloud Code Editor's knowledge of the Spark API and other nice features, people are preferring to work directly with the Cloud Code Editor and very often then neglecting to Export to update the version controlled copy.
I'm putting this out there before we begin to roll our own, in hopes that there is something that already exists!
To be honest, in the short term, we'd be happy if we could just get some autocomplete on the Spark API stuff - that might be enough to get us away from the cloud code editor and into some proper version control. Hopefully there will be some milage in including the TypeScript definitions with VS - perhaps it will reflect those in plain JS too. I'll feed back here if I have any success with this!
Another solution would be if the cloud editor had version control integration (the real thing, and not the import/export features it has at the moment). That's probably a dream too though - it's hard to imagine that such a thing would be very high up on the priorities list.