简体   繁体   English

如何使用Sublime Text 2的Markdown插件?

[英]How to use Markdown plugin for Sublime Text 2?

I'm going to learn the language Markdown to quickly and easily write articles for my website under Wordpress. 我将学习语言Markdown,以便在Wordpress下快速轻松地为我的网站撰写文章。

To do this, I installed under the Sublime Text 2 plugin Markdown Editing. 为此,我在Sublime Text 2插件Markdown Editing下安装。 All delivered normally. 全部正常交付。 Then I create a new document in the editor and assign it a syntax Markdown. 然后我在编辑器中创建一个新文档,并为其分配语法Markdown。

But what to do next? 但接下来该怎么办? How should I save this file? 我该如何保存这个文件? What do I need to compile the file from the markdown in html? 从html中的markdown编译文件需要什么? I have not found a good description of how to work with this plugin and how to get ready html-file from the file markup markdown. 我还没有找到如何使用此插件的良好描述以及如何从文件标记降价获得准备好的html文件。

Tell me, please. 请告诉我。

Apps 应用

For learning Markdown I think Sublime Text may be overkill; 为了学习Markdown,我认为Sublime Text可能有点过分; it's powerful but adds a lot of complexity. 它功能强大但增加了很多复杂性。 It's a great tool but it isn't where I would start. 这是一个很棒的工具,但它不是我要开始的地方。

Instead I would recommend learning Markdown with simpler writing app like Byword or Mou for Mac, MarkPad for Windows or Editorially for the web. 相反,我建议学习Markdown,使用简单的写作应用程序,如BywordMou for Mac, MarkPad for Windows或Editorially for the web。

Still want to use Sublime Text? 仍想使用Sublime Text? I'd highly recommend checking out Federico Viticci's article on Sublime Text and Markdown , some of it is Mac specific but since Sublime Text is a cross-platform tool most of what he mentions is as well, it will definitely help you get started. 我强烈建议查看Federico Viticci关于Sublime Text和Markdown的文章,其中一些是特定于Mac的,但由于Sublime Text是一个跨平台工具,他提到的大部分内容也是如此,它肯定会帮助你开始。

One of the key things to note is that Markdown Editing isn't an all-in-one tool, it's mostly focused on writing and editing Markdown (See my update below) . 需要注意的一个关键事项是Markdown Editing不是一体化工具,它主要侧重于编写和编辑Markdown (请参阅下面的更新) It's still best to pair it with other Markdown related tools for doing things like converting to HTML. 这是最好还是与其他降价相关的工具配对它做这样的事情转化为HTML。

There's also a little more information on Markdown Editing on Brett Terpstra's site (Brett created it). 关于Brett Terpstra网站上的Markdown Editing的更多信息(Brett创建了它)。 Here's the introduction post , Brett's pretty responsive so if you have any questions try leaving a comment or contacting him directly. 这是介绍帖子 ,Brett非常敏感,所以如果您有任何问题,请尝试发表评论或直接与他联系。

Saving 保存

Regardless of the editor you use you have a lot of options for saving. 无论您使用哪种编辑器,您都有很多保存选项。 Markdown is just plain text so you can save the file as .txt or just about whatever you want. Markdown只是纯文本,因此您可以将文件保存为.txt或任何您想要的内容。 The most popular conventions are .txt, .md, and .markdown. 最流行的约定是.txt,.md和.markdown。 I use .md most of the time. 我大部分时间都使用.md。

Converting to HTML 转换为HTML

Here again you have a ton of choices. 在这里,你有很多选择。 Most text editors that have been designed for Markdown will let you copy or export what you've written as HTML. 大多数为Markdown设计的文本编辑器都允许您复制或导出您编写为HTML的内容。 I usually use the fantastic Marked 2 app which is editor agnostic but it's Mac only. 我通常使用奇妙的Marked 2应用程序,它是编辑器无关的,但它只是Mac。 In Sublime Text there are plenty of Markdown converters out there, just search Package Control for Markdown. 在Sublime Text中有很多Markdown转换器,只需搜索Markdown的 Package Control

If you want the most flexibility possible Pandoc does a whole lot more than just HTML. 如果您希望获得最大的灵活性,Pandoc可以做的不仅仅是HTML。 I use the Pandoc Sublime Text extension. 我使用Pandoc Sublime Text扩展。

Another alternative would be to use a Markdown plugin in WordPress so you don't even need to convert it to HTML, just copy and paste it into your WordPress post editor. 另一种选择是在WordPress中使用Markdown插件,因此您甚至不需要将其转换为HTML,只需将其复制并粘贴到您的WordPress帖子编辑器中即可。 I haven't used WordPress recently enough to recommend one specifically but I know there are some very solid options there. 我最近没有使用WordPress专门推荐一个,但我知道那里有一些非常可靠的选择。

Finally, Byword has an optional WordPress extension you can buy if that appeals to you. 最后,Byword有一个可选的WordPress扩展,你可以购买,如果它吸引你。

Learning Markdown 学习降价

One last note, there are some great resources out there for learning the language itself. 最后一点,有一些很好的资源用于学习语言本身。 The spec is certainly comprehensive but can be a little intimidating. 规范当然是全面的,但可能有点吓人。 Lifehacker has a decent introduction but the resource I always recommend is the book Markdown by David Sparks & Eddie Smith. Lifehacker有一个不错的介绍,但我一直推荐的资源是David Sparks和Eddie Smith的书Markdown It does focus on Mac and iOS tools but the language is the same everywhere, still if Apple tools and screenshots are a problem best to try something else. 它确实专注于Mac和iOS工具,但语言在任何地方都是一样的,如果Apple工具和屏幕截图是最好的尝试别的问题。

I hope that helps! 我希望有所帮助!

Update: MarkdownEditing 更新:MarkdownEditing

Looks like my information was a bit out of date regarding the MarkdownEditing package. 看起来我的信息有点过时关于MarkdownEditing包。 It does do a little more than just improving markdown writing or editing now and it's development path is now to make it a fully comprehensive Markdown package. 它确实做的不仅仅是改进降价写作或编辑现在,它的开发路径现在是使它成为一个完全全面的Markdown包。

Thanks to Brett for making it a community project and Ali Ayas heading up the project now. 感谢Brett让它成为一个社区项目, Ali Ayas现在负责该项目。 Further details on Brett's blog here . 有关Brett博客的详细信息,请点击此处

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM