Sometimes I have the need to try: A code example or a variant of it.
This is necessary to test a new functionality or to test its implementation or performance.
The code can be very long.
So I need some way to quickly comment on the code with
/*
* mi código
* …
* /
O con:
//
// mi código
// …
//
When the code is very long, it is cumbersome to do: Select all the code you do not want to run and discuss, Write or insert the code you want to try, Do tests or whatever...
Now...
Select and comment on the new block of code.
Search and select the previous code, and Uncomment.
Do tests or whatever...
And so I need to do it many times since I'm recycling, as I have been thirty years since I program almost nothing.
Is There any way or trick to do it quickly?
If you select a block of code and use the key sequence Ctrl+K+C, you'll comment out the section of code. Ctrl+K+U will uncomment the code.
Comment and uncomment lines of code Press Ctrl+/ .
ctrl + shift + A worked for me for adding multi-line comment.
If you're in vs code just enter ctrl + /. For VS studio 2017 ctrl + k + u.
If you are using visual studio as your IDE you can use the following:
Ctrl+K+C
to commment and Ctrl+K+U
to uncomment.
If using pycharm or VS Code:
Use Cntrl+/
to comment and uncomment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With