什么格式用于存储代码片段与跨平台兼容性的头脑 [英] What format use to store code snippets with cross-platform compatibility in mind

查看:190
本文介绍了什么格式用于存储代码片段与跨平台兼容性的头脑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑到有不同的编程语言和不同的IDE。
有些IDE可以用于多种语言,几乎所有的文本编辑器都可以使用任何编程语言。还有很多操作系统。

我们有代码片段。

我们要写一次,在任何地方使用。我们不希望被绑定到任何语言,工具或平台。

什么格式用来存储代码片段?



个人在此刻我将所有代码片段存储在位于 Dropbox 中的单个文件夹中。文件具有描述性名称,并以编程语言的扩展结尾。每个文件里面都有代码。这一切都可以使用 Sublime Text NVAlt



还有类似的问题: OS / IDE不可知的方法存储片段 https://stackoverflow.com/questions/212634/best-application-for-storing-code-snippets?lq=1 ,推荐的在线代码管理器,如何索引并提供可重用的代码?

您可以使用 Snippe TS 。它可以作为Mac和Windows的原生应用程序,支持本地同步,而且是免费的。



最近我们推出了一个名为分销商的功能。它允许您在IDE或代码编辑器原生中重复使用片段中的代码片段。 这里是当前支持的IDE列表,我们将添加更多的IDE到列表中。

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?

解决方案

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.

这篇关于什么格式用于存储代码片段与跨平台兼容性的头脑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆