Sublime Text Plugin Sublimehighlight

Source: Internet
Author: User
Tags sublime text

Simply put, the Sublimetext sublimehighlight plugin can sublime the code style in the text editor,

Including indentation, code highlighting, etc. converted to HTML code, when viewed in a browser, can be associated with sublime text indistinguishable,

When you need to insert the highlighted code in HTML, consider it!

Installation method:

1, add sublime text of the Repo:https://github.com/n1k0/sublimehighlight/tree/python3

2, search and install Sublimehighlight plug-in

3. Convert the code to Html:edit---Highlight, convert to Html

Note: If you do not know how to install sublime text plugin, please self-Google, degree Niang, about sublimehighlight plug-in details please refer to its homepage,

and this blog!

Here's how it works:

#include <functional>#include <iostream>using namespace std;STD::function< int(int)> functional;//Common functionsint TestFunc(int a){    return A;}//lambda expressionAuto Lambda = [](int a) -int{ return A; };//Copy function (functor)class Functor{Public :    int operator()(int a)    {        return A;    }};//1. class member functions//2. class static Functionsclass TestClass{Public :    int Classmember (int a) { return A; }    Static int Staticmember (int a) { return A; }};int Main(){    //Common functions    Functional = TestFunc;    int result = Functional (Ten);    cout << "normal function:"<< result << Endl;    //lambda expression    Functional = Lambda;    result = Functional ( -);    cout << "lambda expression:"<< result << Endl;    //Imitation functions    Functor Testfunctor;    Functional = Testfunctor;    result = Functional ( -);    cout << "faux function:"<< result << Endl;    //class member function    TestClass testobj;    Functional = STD::Bind (&TestClass::Classmember, Testobj, STD::placeholders::_1);    result = Functional ( +);    cout << "class member function:"<< result << Endl;    //class static function    Functional = TestClass::Staticmember;    result = Functional ( -);    cout << "Class static function:"<< result << Endl;    return 0;}

Sublime Text Plugin Sublimehighlight

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.