"Surround with" doesn't work when there are custom Snippets defined
konytskyy opened this issue · 26 comments
Interesting. Could you post your custom snippets file? Thanks.
Snippets to work with xpo of devexpress
Confirmed. The whole Surround With feature is a wrapper around subset of VS's surround with + dedicated commands with their own shortcuts. It does fall apart when custom snippets are added to the mix.
I have a preliminary patch ready but I'll need to do quite a bit more testing, including other languages that Surround With is supported for. It'll probably be a month or so before I can get a patch out. I'll keep you posted. Thanks.
DPack is fantastic I use it since VS 2015 and if I can contribute in some test...
Here's an updated version that should finalize that Surround With issue. Give it a try and let me know if you run into any issues.
Thank you. It works as expected a bit slow but it works. Is it possible to add also "using" in context menu?
Yeah, I can see that. Old DPack used to do its own formatting instead of relying on built in snippets. I almost dropped Surround With feature for VS 2022 and added this current workaround, The downside is that it's slower, doesn't allow for additional formatting, and not supported for VB of all things,
I'll look into adding using.
OK. Doesn't matter. Thank you again for your work and you add-on :-)
That's for C# isn't it? Thanks.
Yes, it's c#
Yes I know how to do this but how many clicks I do have to arrive to a #region ? :-)
Your extension allow me to have job done in 2 clicks also if it's a bit slow
That's not what I was looking for. I basically wanna see a screenshot similar to mine taken on your machine. Thanks.
Quick update - I'm gonna try resurrecting pre-VS2022 version that doesn't rely on built-in templates.
Resurrected older Surround With functionality. Give new beta a try and let me know how that works for you. Thanks.
Thank you I'll try it immediately
Try restarting VS. I had noticed the same thing here while testing it but couldn't reproduce it - it'd be missing and then back after restart. I'll take a closer look if that still persists for you.
No, neither after restart there is no "Surround with" menu. I have aslo tried to see if this menu was hidden but I could not find it
Identified a breaking change. Will have another beta out in a few days. Thanks.
Give new beta a try and let me know how it turns out. Thanks.
Thank you I'll try immediately
Everything is ok, Surround works as expected and its also very quick. Thak you !!!
New release should be out shortly.