Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I create project specific code snippets?

In visual studio 2010, is there a way to make snippets specific to a single project or solution? I'm interested in doing this so that I might use them to support my architectural decisions (i.e. create a POCO that implements a certain interface in a prescribed manner).

like image 624
Jordan Avatar asked Mar 12 '12 18:03

Jordan


People also ask

How do I create a custom code snippet in Visual Studio 2019?

You can type ifwin to call this piece of code and press “tab” twice to generate the code. To include this new code snippet in Visual Studio you have 2 options: Add: where you can add a folder including various code snippets. Import: Add one or more code snippets to an existing folder.

How do I create a code snippet in HTML?

This is quick and easy to do using a tool like: http://htmlencode.net/ Use <pre><code> tags to surround your code. For the <pre> tag you can optionally add class=”line-numbers”. This will add line numbers to your code and these line numbers will not be copied if students copy and paste snippets.


1 Answers

Even in VS 2013, this is not possible. Snippets are global in Visual Studio.

like image 154
Danny Tuppeny Avatar answered Nov 04 '22 01:11

Danny Tuppeny