Page 2 of 2
Re: Format document in X# 2.21
Posted: Mon Feb 10, 2025 12:56 pm
by ecos
Hi,
I'm working with VS 2022 (german version). This option is not present. I can however add the command
"Kommentarzeile ein/aus Strg+#"
to a menu, but it stays disabled in x#-files. In c#-files you can indeed toggle comments with this option.
Is this something Robert must implement ?
Karl
Re: Format document in X# 2.21
Posted: Mon Feb 10, 2025 1:38 pm
by robert
Karl,
Is this something Robert must implement ?
Yes, this is something we must implement.
We're looking at this
Robert
Re: Format document in X# 2.21
Posted: Mon Feb 10, 2025 1:58 pm
by ecos
Robert,
this would be great, no more broken fingers with Ctrl-K-C and Ctrl-K-U
Karl
Re: Format document in X# 2.21
Posted: Mon Feb 10, 2025 8:28 pm
by ic2
robert wrote: Mon Feb 10, 2025 1:38 pm
Yes, this is something we must implement.
We're looking at this
That explains I never saw it. It isn't in the Advanced menu either in VS2019. I must have checked the options earlier - in an X# project.
The toggle comment is present in VS2019 in a C# project.
Dick
Re: Format document in X# 2.21
Posted: Wed Feb 12, 2025 6:47 am
by HansjoergP
Toggling works also in VS2022 and X#. If nothing is marked it toggles the current line. If more lines are selected than it toggles this lines. If you select only a part inside of an line, than this part is commented out with /* */
The comment assigned is Edit.CommentSelection.
I think everything is working fine in the current version of VS 2022 and current X# Version
Re: Format document in X# 2.21
Posted: Wed Feb 12, 2025 7:20 am
by robert
HansJoerg
HansjoergP wrote: Wed Feb 12, 2025 6:47 am
Toggling works also in VS2022 and X#. If nothing is marked it toggles the current line. If more lines are selected than it toggles this lines. If you select only a part inside of an line, than this part is commented out with /* */
The comment assigned is Edit.CommentSelection.
I think everything is working fine in the current version of VS 2022 and current X# Version
What they are referring to is the Edit.ToggleBlockComment and Edit.ToggleLineComment.
The last of these 2 is the equivalent of Ctrl+B in VO and in XIDE
Robert
Re: Format document in X# 2.21
Posted: Fri Apr 25, 2025 12:24 pm
by ecos
Hi Robert,
just installed the new beta 2.23.0.1 and saw that Edit.ToggleLineComment is indeed working. Thanks for that.
However I didn't see it in the What's New. I think this feature has well deserved to be mentioned...
Karl
Re: Format document in X# 2.21
Posted: Fri Apr 25, 2025 12:42 pm
by Chris
Hi Karl,
Ah, right, we missed that when filling the what's new document, because there was no git ticket associated with this fix.