javascript 比 Evernote 更好的代码片段/示例解决方案?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19333668/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-27 15:12:47  来源:igfitidea点击:

Better Solution than Evernote for Code Snippets/Examples?

javascriptsyntaxeditorcode-snippetsevernote

提问by Phil Powis

I'm learning javascript and want to create a library of example code snippets as I learn new ideas. I'm currently using evernote, but am wondering if there is a more elegant solution where I can create a reference library complete with syntax highlighting/executing the code in the browser.

我正在学习 javascript 并希望在学习新想法时创建一个示例代码片段库。我目前正在使用印象笔记,但想知道是否有更优雅的解决方案,我可以创建一个完整的参考库,并在浏览器中突出显示/执行代码。

Thoughts/suggestions?

想法/建议?

采纳答案by Michael Banzon

I use Evernote as the snippets etc. is primarily from various websites. The web clipper browser plugin lets me create notes right to Evernote with highlighting (as shown on the original website) preserved. Tagging and additional comments along with sharing and the availability (between job/home/mobile in my case) is a very nice addition.

我使用印象笔记作为片段等。主要来自各种网站。Web Clipper 浏览器插件让我可以直接在 Evernote 中创建笔记,并保留突出显示(如原始网站所示)。标记和附加评论以及共享和可用性(在我的情况下在工作/家庭/移动之间)是一个非常好的补充。

For my own snippets from IDE/editor i usually do a screenshot or if i want to preserve the copy-paste-ability i just add a text/source file to Evernote.

对于来自 IDE/编辑器的我自己的片段,我通常会做一个屏幕截图,或者如果我想保留复制粘贴功能,我只需将文本/源文件添加到 Evernote。

回答by Mark V

Tried the Evenote Plugin for Sublime3?

试过 Sublime3 的 Evennote 插件吗?

http://www.sublimetext.com/3

http://www.sublimetext.com/3

https://sublime.wbond.net/packages/Evernote

https://sublime.wbond.net/packages/Evernote

You can save new notes, update existing notes, using github style markdown.

您可以使用 github 样式的 Markdown 保存新笔记、更新现有笔记。

Here is an example:

下面是一个例子:

evernote code snippet example - created with sublime 3 evernote plugin

evernote 代码片段示例 - 使用 sublime 3 evernote 插件创建

回答by MaxBauer416

I use

我用

app.gistboxapp.com

app.gistboxapp.com

You need a GitHub account to login: this app connects to your Gists repository saved into Github and keeps all your code snippets. It's web based so you don't need to download anything. Everytime you save a new snippet GistboxApp will add a Gist to your Github repository.

您需要一个 GitHub 帐户才能登录:此应用程序连接到您保存在 Github 中的 Gists 存储库并保留您的所有代码片段。它是基于网络的,因此您无需下载任何内容。每次你保存一个新的片段时,GistboxApp 都会向你的 Github 存储库中添加一个 Gist。

You can label all your snippets to divide them in categories.

您可以标记所有片段以将它们分类。

Hope this helps...it works fine for me

希望这会有所帮助......它对我来说很好用

回答by devmake

For OS X there is Quiver. It is very similar to Evernote in look and feel and adds many useful code snippets related features.

对于 OS X,有Quiver。它在外观和感觉上与 Evernote 非常相似,并添加了许多有用的代码片段相关功能。

Quiver is a notebook built for programmers. It lets you easily mix text, code, Markdown and LaTeX within one note, edit code with an awesome code editor, live preview Markdown and LaTeX, and find any note instantly via the full-text search.

Quiver 是一款专为程序员打造的笔记本。它让您可以轻松地在一个笔记中混合文本、代码、Markdown 和 LaTeX,使用出色的代码编辑器编辑代码,实时预览 Markdown 和 LaTeX,并通过全文搜索立即找到任何笔记。

Quiver screenshot

箭袋截图

回答by Scott

I am really liking Marxico, so far.

到目前为止,我真的很喜欢马克思科

With this tool, your text is still stored in Evernote, but it supports code block formatting and markdown for notes. Note: This won't actually run your code.

使用此工具,您的文本仍存储在 Evernote 中,但它支持代码块格式化和笔记的 Markdown。注意:这实际上不会运行您的代码。

回答by Mark R

You can also use http://tohtml.com/and copy and paste over.

您也可以使用http://tohtml.com/并复制并粘贴过去。

Works for me.

对我来说有效。

回答by Aaron Caito

I like and use codebox but afaik it's osx only. http://www.shpakovski.com/codebox/

我喜欢并使用 codebox,但 afaik 它只是 osx。 http://www.shpakovski.com/codebox/

Would really like to see this become cross platform.

真的很想看到这成为跨平台。

回答by relidon

I know this has been answered perfectly, but if you use sublime text as your code editor, evernote can be a fantastic was to collect and use snippets.

我知道这已经得到了完美的回答,但是如果你使用 sublime text 作为你的代码编辑器,evernote 可以是一个很棒的收集和使用片段的地方。

Sublime text as an evernote plugin. With it you can add notes (so type your snippet in sublime text and push it to evernote from sublime text) and open your evernote notes in sublime text.

作为印象笔记插件的 Sublime 文本。有了它,你可以添加笔记(所以在 sublime text 中输入你的片段,然后将它从 sublime text 推送到 evernote)并在 sublime text 中打开你的 Evernote 笔记。

So you just add your snippets to evernote. Then search them within sublime text and use them! There is a similar plugin for gist, where you store your snippets as gists and then access them through sublime text. But I think, evernote is a better option as it's easier to edit and re-sort snippets.

所以你只需将你的片段添加到印象笔记中。然后在崇高的文本中搜索它们并使用它们!有一个类似的 gist 插件,您可以将片段存储为 gist,然后通过 sublime text 访问它们。但我认为,evernote 是一个更好的选择,因为它更容易编辑和重新排序片段。

The evernote plugin

印象笔记插件

The gist plugin

要点插件