Commenting Ruby in Xcode
UPDATE: The new TextWrangler 2.2 has Ruby highlighting. Yay!
Coding Ruby in Xcode on a Mac? Like the built-in syntax highlighting but wondering why the apple+/ shortcut makes C comments, not Ruby comments? The following might save you a few minutes digging.
Find and open this file:
/Library
/Application Support
/Apple
/Developer Tools
/Scripts
/10-User Scripts
/30-Comments
/10-un_commentLines.pl
Replace this...
PERL:
-
# determine the type of file we have by looking for the #! line at the top
-
# careful--it might already be commented out!
-
my $commentString;
-
$commentString = $perlCmt;
-
} else {
-
$commentString = $cCmt;
-
}
...with this...
PERL:
-
my $fileName = "%%%{PBXFilePath}%%%";
-
-
# determine the type of file we have by looking for the #! line at the top
-
# careful--it might already be commented out!
-
# Otherwise look at the file extension
-
my $commentString;
-
$commentString = $perlCmt;
-
} else {
-
$commentString = $cCmt;
-
}
Restart Xcode. Now commenting should work properly.