I suggest you ...

Improve code snippets creation

This suggestion is migrated to Developer Community. Please use below link to view the current status.
https://developercommunity.visualstudio.com/content/idea/351360/improve-code-snippets-creation.html
// Example
std::vector<bool> v;

// v.for would generate:
for (unsigned int i = 0; i < v.size(); i++)
{
}

// v.foreach would generate:
for (bool element : v)
{
}

// v.fori would generate:
for (auto iterator = v.begin(); iterator != v.end(); iterator++)
{
}

std::list<bool> l;
// l.fori would generate:
for(auto iterator = l.begin(); iterator != l.end(); iterator++)
{
}

3 votes
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
João Pedro Miranda Maia shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

We will definitely consider an easier way to enable users to define their own snippets.

In the meantime, you can create your own custom snippets based on the XML format of the current snippets under C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\Snippets\1033\Visual C++. We recommend putting your custom snippets under a separate folder for organizational purposes (see Tools → Code Snippets Manager → Visual C++ → Add…), but VS should automatically pick up any snippets you create in those locations.

(Note that the Snippets Manager recommends putting your own snippets under C:\Users\<Your_Username>\Documents\Visual Studio 14\Code Snippets\Visual C++\My Code Snippets.)

0 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base