converting multiple lines of code to comment
Votes from Connect: 5
Original Date Submitted: 2/20/2015 2:01:32 PM
Site Name: PowerShell
Feedback ID: 1139497
Frequency: Always Happens
Regression: Yes, this happens in all previous versions
in PS 4.0 and also previous versions, there is no option to easily convert multiple selected lines to comment block. so when we have selected multiple lines & we want to make them as comment, we have to insert comment block in another location on the pane, and then cut these multiple lines and paste them inside comment block which is a bit cumbersome.
but in other products like VBA2013, this option exist & there is a button on edit toolbar which converts multiple lines into comment, in place.
hope this be added in PS 5.0
Product Studio item created by Connect Synchronizer due to creation of feedback ID 1139497 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=1139497).
Internal BugId: 13253
We’d like to do this at some point. We’ll post back here if it happens in the ISE Preview. Read more about it here: https://blogs.msdn.microsoft.com/powershell/2016/01/20/introducing-the-windows-powershell-ise-preview/
David das Neves commented
- Open Ise
- set cursor to start of the first line which shall be commented
- ALT + SHIFT + Down till you reach last line
- write your comment block "###"