Improve code snippets creation
This suggestion is migrated to Developer Community. Please use below link to view the current status.
// 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++)
// l.fori would generate:
for(auto iterator = l.begin(); iterator != l.end(); iterator++)
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.)