Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to comment out a large block of code in TextMate?

I don't see anything in the Ruby bundle that will help me add comments to a large block of code. The links I have found online to such a shortcut do not appear to be valid any more.

like image 655
AKWF Avatar asked Feb 28 '12 16:02

AKWF


People also ask

How do you comment out big chunks of code?

The leading characters // are added to the beginning of each line when commenting one or more lines of code. You can also block comment multiple lines of code using the characters /* */ .

How do you comment a whole block of code in VS code?

Comment Code Block Ctrl+K+C/Ctrl+K+U If you select a block of code and use the key sequence Ctrl+K+C, you'll comment out the section of code.

How do I comment out a large block of code in R?

If you use RStudio, you can use the keyboard shortcut Ctrl + Shift + C ( Command + Shift + C on macOS) to comment out a line of text.


1 Answers

It's not Ruby-specific: the same shortcut works for every languages and is found in the "Source" bundle.

It's Cmd/

like image 166
romainl Avatar answered Nov 02 '22 21:11

romainl