Incidentally, the =begin and =end syntax seems pretty cumbersome to me
(compared to /* */ for instance). Is it like this because Ruby is so
versatile and anything else would be difficult to parse?
···
On Sun, 2005-12-25 at 21:45 +0900, Stefan Lang wrote:
* Ensure that there is no space/tab before =begin and
=end (i.e. the = must be the first character in the line)
Incidentally, the =begin and =end syntax seems pretty cumbersome to me
(compared to /* */ for instance). Is it like this because Ruby is so
versatile and anything else would be difficult to parse?
Maybe it's like that because it's a facility you're not supposed to use; many people feel block comments are a bad idea. Personally, I only use them in languages which lack line comments.
mathew
···
--
<URL:http://www.pobox.com/~meta/>
My parents went to the lost kingdom of Hyrule
and all I got was this lousy triforce.
Well if you want to temporarily get rid of a large number of lines,
block comments are much, much quicker than doing a line comment for each
and every line. I don't tend to leave block comments in the app though
-- just during development I find them useful.
···
On Wed, 2005-12-28 at 13:22 +0900, mathew wrote:
Jonathan Leighton wrote:
> Incidentally, the =begin and =end syntax seems pretty cumbersome to me
> (compared to /* */ for instance). Is it like this because Ruby is so
> versatile and anything else would be difficult to parse?
Maybe it's like that because it's a facility you're not supposed to use;
many people feel block comments are a bad idea. Personally, I only use
them in languages which lack line comments.
Jonathan Leighton wrote:
> Incidentally, the =begin and =end syntax seems pretty cumbersome to me
> (compared to /* */ for instance). Is it like this because Ruby is so
> versatile and anything else would be difficult to parse?
Maybe it's like that because it's a facility you're not supposed to use;
many people feel block comments are a bad idea. Personally, I only use
them in languages which lack line comments.
Well if you want to temporarily get rid of a large number of lines,
block comments are much, much quicker than doing a line comment for each
and every line. I don't tend to leave block comments in the app though
-- just during development I find them useful.
Perhaps.
V10n:s/^/#/
Comments out the next ten lines for me. I could alias
it to a macro key but I have not bothered yet
Well if you want to temporarily get rid of a large number of lines,
block comments are much, much quicker than doing a line comment for
each and every line.
In vim, I simply use block select (ctrl-v) to select the first column
of the affected lines and replace the spaces with comment marks (r#).
This has the additional benefit of not shifting the commented-out code
to the right.