'VSCode User Snippet for PHPDoc comments
I am trying to create a user snippet for adding a PHPdoc comment. It works fairly well but I am having a sort of annoying issue where once I hit enter to go to a new line in the comment I have to add each star manually. If I enter the /** and tab it will automatically add the star at the beginning of each line when I don't use my custom snippet. I was curious if there's a way to add this functionality to my own snippet so I can use my snippet to tab after * instead of /**
My Snippet
"Add shortcode for PHPDoc comment": {
"prefix": "*",
"body": [
"/**",
"* $0",
"*/"
],
"description": "Creates a quick template for adding PHPDoc comments"
}
Current Functionality when I hit enter to add a new line (| is where mouse ends up)
/**
*
|
*/
Desired Functionality
/**
*
*|
*/
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
