'User Snippet in C++ Line Highlight

I have create a user snippet for driver code in C++. But when I use that code snippet my line gets highlighted. Even though I have other snippets for class, for loops, etc but problem persist only with cpp snippet.

cpp.code-snippet:

1

example.png:

2



Solution 1:[1]

Your snippet contains one placeholder ($1). When you insert a snippet, the cursor gets to the position of the first placeholder and all the placeholder code will be grayed out for your convenience. As soon as your cursor leaves this gray area, the area will stop being gray. In general, you can use the tab key, which takes you to the next placeholder, if there is one, and outside the snippet otherwise; if you are inside the placeholder, then you can return to the previous one with the shift + tab combination.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Alexey Ismagilov