I'm trying to comment out a large piece of code in a program but it's too difficult to do it manually. Is there a program to do it for me? (making such program doesn't seem hard anyway) Also, I'm using emacs. Does emacs have such a function? (or an emacs Lisp file at least?)
use % for a single line. Everything from the % to the end of that line of the file is ignored by the program and is only for use by the human reader of the code. use %{ comment %} for Multiline comments (or repeat the % down the left side of your paragraph).
To comment out a selection, select the lines of code, go to the Editor or Live Editor tab, and in the Code section, click the comment button . You also can type Ctrl+R. To uncomment the selected lines code, click the uncomment button or type Ctrl+Shift+R.
In emacs, you can use M-x comment-region
and M-x uncomment-region
.
The comment-region
method bound to key M-;
. You can select region using marker and then use M-;
to comment/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