Follow the instructions in http://www.cnblogs.com/liulun/archive/2009/05/27/1491116.html. I didn't expect the interface to be so convenient, and the plug-in is so easy to do.
Specifically,
1. Create a project for Class Library (C #)
2. Follow his instructions.
1) An entity class, static, contentprocessor. It is the string that is pasted in the text box and decorated with HTML code CSS.
2) A form that is used to paste code into it. Press OK to return the string in the text box.
3) a class that inherits the writer interface. Some information, such as the name displayed by the plug-in. Other information, such as whether the URL indicates the sent object is unknown.
This class control opens the form. After the confirmation is pressed, the content is obtained through the static class. If the content is not empty, the returned dialogresult. OK and else no.
Effect:
Test
Obviously, this effect does not support functions such as code re-arrangement, which is obviously unsatisfactory, but it is enough for learning plug-ins.
In addition, a blog recommends an official plug-in: paste from Visual Studio. After you copy the code from Visual Studio, press the corresponding button in the right column to insert it to the cursor in the Visual Studio style. Color and indent.
However, I still like the style that can be folded and copied. It is said that JavaScript is used.