XSharpPublic icon indicating copy to clipboard operation
XSharpPublic copied to clipboard

Provide separate commands/toolbar buttons for single line and block commenting in the source code editor

Open cpyrgas opened this issue 2 years ago • 1 comments

Regarding single line and block commenting, I think it's better to have separate buttons/commands for block commenting and for single line commenting. This way the programmer can select a few lines and choose easily if they want to block or line comment them, and also for a single line, can choose to block comment a part of comment the whole line.

In XIDE I am using key combinations for that (CTRL+B for single line and SHIFT+CTRL+B for block), and the same keys can be used to uncomment single/block comments/

cpyrgas avatar Oct 04 '23 08:10 cpyrgas

The buttons inside VS are not "ours". They are provider by Ms. Vs has commands

  • Edit.CommentSelection
  • Edit.UncommentSelection
  • Edit.ToggleBlockComment
  • Edit.ToggleLineComment
  • Edit.InsertComment

We are responding to the first 2 commands at this moment

I see that we are not responding to the ToggleBlockComment and ToggleLineComment at this moment. We can probably add that for a next build.

Edit.InsertComment is triggered by the triple slash. We support that too.

RobertvanderHulst avatar Oct 04 '23 09:10 RobertvanderHulst