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
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.
I wrote this to allow me to call a command from TM (for me it's mac 3) which takes the selected text and prepends '=begin' and appends '=end'. I did it primarily so I could fold large comment blocks. Just add a new command to your bundle editor and add this. Be sure to set input to selected text. Also this was just a quick little thing I came up with on the spot so no guarantees.