Modify default C++ snippets in VS Code

Viewed 775

I would like to modify the default code snippets for C++ in Visual Studio Code. I've found a similar question here, but they actually show how to create your own snippets - and not how to modify the default snippets.

The reason I want to do this is because I'm used to doing some things a bit differently than how they are done in the snippets. For example, this is what appears when I use the if snippet:

if (/* condition */)
{
    /* code */
}

And I would like it to be like this:

if(/* condition */){
    /* code */
}

Is there any way to achieve what I want to do? Thank you.

1 Answers
  1. Press Ctrl + ,(opens vs code settings);
  2. Type "snippet" in settings search bar;
  3. In Extentions List choose C/C++
  4. Untick "Suggest Snippets" button;
  5. Close settings tab.
  6. Go to settings again and create new User Snippets as you liked.enter image description here
Related