This function is not practical, but after all, it is a functional point of the VS existence, know a bit good! There's a reason to say that it's not practical, because now the powerful VS editor has countless plugins, and these plugins have a lot of power! such as Resharper,code assit and so have a very smart sense and code formatting features, really good!
- After opening vs, click on the Tools menu and select the code Snippet Manager:
- After entering, the language chooses Visual C #;
- Then click on the Visual C # folder below, "location" where the path of the code snippet file will appear;
- Copy the path, in the Start menu "Search All Programs and files" text box paste, of course, you can also paste in the address bar of my computer, as long as the path can be found;
- After the carriage return, you will see a lot of files, all with. Snippet as the suffix, copy a file to the desktop, such as the Cw.snippet file (this file is Console.WriteLine (), the code snippet file);
- Locate the file on the desktop, right-click, select Notepad to open;
- After opening, you only need to modify the following red box out of the place, such as I want to write a console.readline (), the code snippet;
- After modification, the following:
- Save, change the file name, such as I changed to Cr.snippet, and then copied to the directory just now;
- Open vs (If the VS production snippet is not closed before, then vs requires a reboot), try the code snippet you just made, and see that it's in effect;
- There is a hint, there is wood! Then press the TAB key 2 times to show it all! Oh, it's done!
TKB to Jane: http://www.cnblogs.com/farb/
qq:782762625
Welcome to communicate with you!
This article copyright belongs to the author and the blog Garden altogether, welcome reprint. Without the consent of the author, the original link and the author must be clearly marked on the article page, otherwise the right to pursue legal liability is reserved.
If you think this article is good or something, you can click on the "recommended" button in the lower right corner, because your support is my biggest motivation to continue writing and sharing!
Customizing code Snippets in VS