问题
I would like a way to store code snippets in a very straightforward way (to store and to retrieve).
I code sometimes at home sometimes at work or various other workspaces, so I'd like a repository that's in the cloud. I would also like there to be an option for some kind of OS integration (via shortcut key perhaps; don't want to have to navigate to a webpage (snipplr) or an application (evernote) to retrieve the code).
Ideally something that combines the best of Snipplr and Ditto.
There's a similar question here, but I'm specifically concerned with a method that will work in OSX or Windows and be quicker to use within the OS than Evernote/Snipplr. If something like that even exists
回答1:
I believe Snippets is right for you. It is available as a native apps for Mac and Windows, supports sync out of the box and it's free. Also recently we released a feature called Distributors. It allows you to re-use code snippets from Snippets in your IDE natively. Here are a couple of demos that demonstrates Snippets Distributors in action.
- Snippets Distributor for Xcode
- Snippets Distributor for Visual Studio
Disclaimer: I'm a founder of Snippets. Feel free to ask any question.
来源:https://stackoverflow.com/questions/7325309/os-ide-agnostic-method-of-storing-snippets