I understand I can press "<Command> + /" to block comment sections of code. However, I want comment out 100 lines of code which consist of code statements and existing comments. Is there a way to block comment these 100 lines (and unblock them eventually) while preserving the existing comments as "comments"
In addition, I prefer not to use the /* */ comments as I like that each line itself is commented out.
For an easy example of what I would like to do:
1 // this is a comment
2 // this is a comment
3 for i in 1...4 {
4 print("\(i)"
5 }
I would like to block comment out the 5 lines to result in the following
(Please notice how lines 1 and 2 now have double comments)
1 // // this is a comment
2 // // this is a comment
3 // for i in 1...4 {
4 // print("\(i)"
5 // }
I would then like to unblock the 5 lines to result in the following
(Please notice how lines 1 and 2 are now back to the original comments)
1 // this is a comment
2 // this is a comment
3 for i in 1...4 {
4 print("\(i)"
5 }