jason-pomerleau / vscode-wordpress-toolbox

The ultimate WordPress snippet collection for Visual Studio Code.
MIT License
41 stars 8 forks source link

Remove unnessecary commas if parameter not used #5

Open ITaluone opened 4 years ago

ITaluone commented 4 years ago

Hi It would be great if this extension also removes the commas (before or after, makes no difference) if you remove unwanted parameters.

screen

jason-pomerleau commented 4 years ago

I would love this feature too, but unsure how to implement it with VSCode's snippet syntax.

I believe we want the tab stops to highlight the function parameter itself (excluding the comma) so that we don't type over the comma when we are entering the param value. I suppose I could create another tab stop on the comma itself, but this could be a worse UX, because then you would have to tab through the commas every time in between function parameters.

Any suggestions welcome!