PowerShell ISE - Is there a keyboard shortcut for commenting out lines or multiple lines
In PowerShell ISE I would like to comment out a line or multiple lines at once with a keyboard shortcut like how Sublime Text does this.
Is this possible to add or remove the #
shown in the example below via a keyboard shortcut?
[console]::beep(350,400)
< toggle betweeen these > #[console]::beep(350,400)
Solution 1:
Not elegant but functional...
To Comment
"Block Select" at the start of all the lines by:
- AltMouse-Left-Click-Drag or
- AltShift while ↑↓
... then ...
- Shift3
To UnComment
"Block Select" all the #
characters at start of all the lines by:
- AltMouse-Left-Click-Drag or
- AltShift while ↑↓←→
... then ...
- Delete