简体   繁体   中英

Visual Studio 2013 code snippets / code templates

Ie in eclipse there is a place where I can define my own user keywords for autocomplete like:

word: else

And template to paste:

else {
    ${cursor}
}

Sorry if this is naive but so far I'm unable to discover such feature in Visual Studio. Does any one of You know where I could find that feature?

In Visual Studio these are called "Code Snippets". This feature is not related to IntelliSense.

There are a number of them built in, for example in C# if you type "ctor" it will create a simple constructor for the class you are in. For other C# snippets see here .

You can create your own as well.

Have a look here: https://msdn.microsoft.com/en-us/library/ms165392(v=vs.140).aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM