Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

To do this, I installed under the Sublime Text 2 plugin Markdown Editing. All delivered normally. Then I create a new document in the editor and assign it a syntax 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? 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.

Tell me, please.

like image 912
gearmobile Avatar asked Nov 24 '13 11:11

gearmobile


People also ask

How do I enable Markdown?

Enabling Markdown for Plugin-enabled SitesGo to Jetpack → Settings → Writing. Under Composing click the button next to “Write posts or pages in plain-text Markdown syntax.” If the Save Settings button is not grayed out, click it to save the changes.

What is a Markdown plugin?

The Markdown plugin can export your Markdown files to HTML and PDF out of the box. If you configure Pandoc, it will also be able to export to and import from Microsoft Word files (DOCX).

How do I Preview Markdown in HTML?

Tip: You can also right-click on the editor Tab and select Open Preview (Ctrl+Shift+V) or use the Command Palette (Ctrl+Shift+P) to run the Markdown: Open Preview to the Side command (Ctrl+K V).

How do you code in Markdown?

There are two ways to format code in Markdown. You can either use inline code, by putting backticks (`) around parts of a line, or you can use a code block, which some renderers will apply syntax highlighting to.


1 Answers

Apps

For learning Markdown I think Sublime Text may be overkill; 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.

Still want to use 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.

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). It's still best to pair it with other Markdown related tools for doing things like converting to HTML.

There's also a little more information on Markdown Editing on Brett Terpstra's site (Brett created it). Here's the introduction post, Brett's pretty responsive so if you have any questions try leaving a comment or contacting him directly.

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. The most popular conventions are .txt, .md, and .markdown. I use .md most of the time.

Converting to 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. I usually use the fantastic Marked 2 app which is editor agnostic but it's Mac only. In Sublime Text there are plenty of Markdown converters out there, just search Package Control for Markdown.

If you want the most flexibility possible Pandoc does a whole lot more than just HTML. I use the Pandoc Sublime Text extension.

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. I haven't used WordPress recently enough to recommend one specifically but I know there are some very solid options there.

Finally, Byword has an optional WordPress extension you can buy if that appeals to you.

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. 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.

I hope that helps!

Update: MarkdownEditing

Looks like my information was a bit out of date regarding the MarkdownEditing package. 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.

Thanks to Brett for making it a community project and Ali Ayas heading up the project now. Further details on Brett's blog here.

like image 123
Christin White Avatar answered Oct 03 '22 21:10

Christin White