Does Ruby have block comments?
If not, is there an efficient way of inserting #
in front of a block of highlighted code in TextMate?
Does Ruby have block comments?
If not, is there an efficient way of inserting #
in front of a block of highlighted code in TextMate?
You can do
=begin
[Multi line comment]
=end
=begin
and =end
must be at the beginning of the line (not indented at all).
Also, in TextMate you can press Command + / to toggle regular comments on a highlighted block of code.
Ruby has documentation comments - they look like this:
=begin
...
=end
Not perfect but they get the job done in a pinch.
[Edit] It is important to note that =begin
and =end
must be at the beginning of their respective lines.
In TextMate, you can alt-drag vertically to select a column of text. This will duplicate the insertion point across all the lines you select, so you can insert or delete multiple #
s at once.
UPDATE: Also in TextMate, assuming you have the right language selected, Cmd + / will toggle commenting every line in a selection regardless of language.
In TextMate 2 you can ⌘/ to comment out the current line or selected lines.
© 2022 - 2024 — McMap. All rights reserved.
Meta-;
to comment / uncomment a selected region. – Billowy