Use sublime text2 to edit markdown

Source: Internet
Author: User

Introduction to Part1 Markdown

Markdown is a simple and lightweight markup language created by John Gruber and Aaron Swartz. Markdown has many advantages, such as its simple syntax, which makes it easier to read, maintain, and modify documents. However, I think one of the more attractive advantages is:

Markdown allows us to focus on the content of the article, rather than the layout.

This is indeed the case. Whether writing a blog or writing other articles, if you use word to write, typographical layout will inevitably be an annoyance. However, if html is used for writing, although it is intuitive, the constant input of tags will inevitably greatly reduce the writing efficiency. For example, write a simple list:

      sublime text2     markdown     notepad++ 

 

In fact, we only want to output a simple list, but it takes almost time to edit the tag. So let's take a look at using Markdown to implement this list.

   - notepad++

You only need to add the "-" symbol before each list content to directly generate an unordered list.

  • Sublime text2
  • Markdown
  • Notepad ++

Let's take a look at how to use Markdown to output the title:

      ###### This is h5
This is h1This is h2This is h3This is h4This is h5This is h6

More Markdown syntax can refer to the http://wowubuntu.com/markdown/ here not to list, basically spend a 5-10 minutes to grasp the basic syntax of Markdown.

Part2 uses Markdown on sublime

How can we use Markdown as a sublime enthusiast? First of all, install sublime and Package Control... For details, refer to Sublime Text 2 Introduction and tips.

Install the Markdown Preview plug-in

Only Markdown Preview is recommended for the Markdown plug-in. Mardown Preview not only supports previewing the Markdown file in the browser, but also exporting html code, which greatly facilitates code export and publishing to the blog.

The following describes how to install and use the Markdown Preview plug-in. 1. On the plug-in installation panel, locate Markdown Preview and install it.

2 ctrl + shift + p (shortcut key in windows) Call up the command panel and enter mdp. The red box in the text box is circled to preview the Markdown file in the browser. Another common function is the fourth in the figure, Export HTML in Sublime Text, that is, exporting html files to sublime text.

Markdown syntax highlighting

In sublime's own theme style, there is no markdown syntax highlighting function, so I found a simple modification from the Internet and felt that the color match was okay. Enclose the Code address: Monokai-custom.tmTheme to download the code above and name it: Monokai-custom.tmTheme, put it in the Packages/User/file directory, and then select in the panel: preferences-> Color Scheme-> User-> Monokai-custom, as shown in:

The highlighted effect is shown in.

Conclusion: It is quite convenient to write articles using Markdown syntax. This article is also written using Markdown, which is more efficient than using Windows Liver Writer. Of course, the disadvantage in the United States is the processing of images. Because Markdown can only insert image addresses and cannot upload images, I first upload images to the site through ftp and then obtain links for insertion. If a better method is found in the future, supplement it.

Independent blog address: http://www.1008a.com/post/679.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.