As suggested, I have opened a feature request here:
https://developercommunity.visualstudio.com/t/Visual-Studio-IDE-Code-snippet-to-conver/1540445
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I would like to accomplish the following in a C++ class via a Visual Studio 2019 IDE code snippet:
Link here, reproduced below:
which creates a variable name (to hold a constant) in UPPERCASE letters and creates related function names in lowercase of the same name.
The above is accomplished in VSCode via the following code snippet:
"var set getx":{
"prefix": "varsetgetx",
"body":[
"${1:int} ${2:VARNM};",
"$1 ${2/(.*)/${1:/downcase}/}(){return $2;}",
"void ${2/(.*)/${1:/downcase}/}($1 val){$2 = val;}"
]
}
Is there a way to accomplish this in Visual Studio IDE 2019? There seems to be only one other question I could find, but that is from back in 2006, more than 15 years ago. That thread is here.
The answer on that thread unfortunately was that it would not be possible to accomplish something like this. Is it still the case that this is not possible now using the latest VS 2019 IDE?
Thank you.
As suggested, I have opened a feature request here:
https://developercommunity.visualstudio.com/t/Visual-Studio-IDE-Code-snippet-to-conver/1540445
Hi,
I suggest you directly suggest this feature to Visual Studio Product Team in our Developer Community, and if you do suggest this feature, please share the link here, other forum members who are interested or needed this feature will go to vote for this thread.
Best regards,
Minxin Yu
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
The name snippet implies adding code. I think you are trying to change existing code and that is not what snippets are designed for. I think that is what the other answer is saying. If I misunderstand what you are saying then please explain what you need without the animation.