How to use the Sublimetext style code highlighting style in your blog

Source: Internet
Author: User
Tags sublime text

The style applied in the blog is the theme in the Sublimetext editor, just install sublime and install it, install the Sublimehighlight plugin

Https://github.com/n1k0/SublimeHighlight/tree/python3

The way the line was installed, no success, probably because I was cracked version of the software, directly download the plugin package, the GitHub page will download the plugin zip file down

, unzip to the appropriate folder: Find the SUBLIMETEXT3 installation path under the plug-in package path (D:\Program files\sublime text3\data\packages), the downloaded files can be extracted here

Open Sublime Text 3, in the menu bar item Click Preferences can find the installed plug-in

In the unpacked folder there is a file "Sublimehighlight.sublime-settings", is used to configure the plugin properties, we can use sublime Text 3 to open the file for corresponding changes.

Rotor: http://jingyan.baidu.com/article/90808022c1a1d4fd91c80f21.html

Click on the menu bar "edit"-"Highlight"-"Convert to HTML", you can generate HTML code

The generated HTML code of the div block copied out, pasted into our blog's Code editing area, you can achieve the highlight effect, so that the build is inline style, if you want to modify the blog post, it will not affect the style.

For example the following example

<div class= "Highlight" style= "background: #272822" ><pre style= "line-height:125%" ><span style= "color: #f92672 "&GT;&AMP;LT;? </span><span style= "color: #a6e22e" >php</span>
<span style= "color: #75715e" >//$xml = &quot;&quot;; </span>
<span style= "color: #f8f8f2" > $format </span> <span style= "color: #f92672" >=</span> <span style= "COLOR: #e6db74" >& #39; There is%d monkeys in the%s& #39; </span><span style= "color: #f8f8f2" >;</span>
<span style= "color: #f8f8f2" > $num </span> <span style= "color: #f92672" >=</span> <span style = "COLOR: #ae81ff" >3</span><span style= "color: #f8f8f2" >;</span>
<span style= "color: #f8f8f2" > $location </span> <span style= "color: #f92672" >=</span> <span style= "COLOR: #e6db74" >&quot;tree&quot;</span><span style= "color: #f8f8f2" >;</span>
<span style= "color: #f8f8f2" >sprintf ($format,</span> <span style= "color: #f8f8f2" > $num, </span > <span style= "color: #f8f8f2" > $location);</span>
</pre></div>

<? PHP //$xml = ""; $format = ' There is%d monkeys in the%s ' ; $num = 3 ; $location = "Tree" ; sprintf ($format,$num,$location);

How to use the Sublimetext style code highlighting style in your blog

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.