What format use to store code snippets with cross-platform compatibility in mind

只愿长相守 提交于 2019-12-11 21:06:32

问题


Consider that there are different programming languages and different IDE. Some IDE is possible to use for many languages, almost all Text Editor possible use with any programming language. There also many operation systems.
And we have code snippets.
We want write it once, use it anywhere. We don't want to be bound to any language, tool or platform.
What format use to store code snippets ?

Personally at this moment I store all snippets as files in single folder located in Dropbox. Files have descriptive names and ends with extension of programming language. Inside each file there is simply code. It's all searchable using Sublime Text or NVAlt

There are similar questions: OS/IDE-agnostic method of storing snippets, https://stackoverflow.com/questions/212634/best-application-for-storing-code-snippets?lq=1, Recommended online snippet manager, How do I index and make available reusable code?


回答1:


You can use Snippets. It is available as a native apps for Mac and Windows, supports sync natively and they are free.

Recently we introduced a feature called Distributors. It allows you to re-use code snippets from Snippets in your IDE or code editor natively. Here is the list of currently supported IDEs and we are adding more IDEs to the list.



来源:https://stackoverflow.com/questions/17444182/what-format-use-to-store-code-snippets-with-cross-platform-compatibility-in-mind

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!