Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Fontano

macrumors member
Original poster
Jun 27, 2008
72
0
Continuing my conversion from Visual Studio to XCode...

Is there a way to highlight a bunch of rows, and bulk comment/uncomment them?

So if I want to block an entire section of code during debugging or trying things out, I can do it quickly and in blocks.
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
The scripts menu (It looks like a scroll being unrolled), under Comments, there is Un/Comment selection. it is bound to Apple+/ (in my version, at least).

I didn't know this until I looked it up, but I rarely use XCode.

-Lee
 

Fontano

macrumors member
Original poster
Jun 27, 2008
72
0
The scripts menu (It looks like a scroll being unrolled), under Comments, there is Un/Comment selection. it is bound to Apple+/ (in my version, at least).

I didn't know this until I looked it up, but I rarely use XCode.

-Lee

Two questions...

-) Where did you look it up at (so I can look for other things in the future)
-) What do you normally use then?
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
Two questions...

-) Where did you look it up at (so I can look for other things in the future)
-) What do you normally use then?

googled something like "XCode block comments" and found something in apple's mailing list archives. This really should be easier and the information should be easier to come by. I am not sure if this is in the XCode help.

95% of the time at work I am writing C and Fortran in vi, compiling using make with gcc and g95. The rest is in Java in Eclipse, though I am trying to push for more of that. I like the commandline best, but prefer Java to Fortran.

For hobby programming it's about 50/50 between vi and gcc/g++/javac vs XCode for Objective-C.

-Lee
 

HiRez

macrumors 603
Jan 6, 2004
6,265
2,630
Western US
Command-forward slash is correct (and will also toggle to uncomment blocks).

Another one you might find useful is Command-[ and Command-] to indent blocks of code left or right.
 

gnasher729

Suspended
Nov 25, 2005
17,980
5,566
Continuing my conversion from Visual Studio to XCode...

Is there a way to highlight a bunch of rows, and bulk comment/uncomment them?

So if I want to block an entire section of code during debugging or trying things out, I can do it quickly and in blocks.

#if 0 / #endif
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.