• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Comment a block
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Comment a block


  • Subject: Re: Comment a block
  • From: Ken Thomases <email@hidden>
  • Date: Thu, 2 Sep 2010 17:13:45 -0500

On Sep 2, 2010, at 4:23 PM, David Blanton wrote:

> When editing a .h file that contains a cpp class definition and an obj-c class definition if I select a block of code in the cpp class and press cmd-/ only the fisrt line of the selecyed blok is commented with //.
>
> If I select a block of code in the obj-c class and press cmd-/ all lines in the selected block are commented with //.
>
> Can someone explain to me, like I am a Windows programmer, why this happens? Or better how do I get the obj-c comment behavior in the cpp class?

You can view the script used to perform the (un)commenting.  Scripts menu > Edit User Scripts > Comments > Un/Comment Selection.

Other than differentiating between scripting languages and C-based languages based on the very beginning of the file, it is not sensitive to or aware of the language of the code.

I suspect you have mixed line breaks in the file such that the script perceives the C++ class as being all on one line.

Regards,
Ken

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Comment a block
      • From: David Blanton <email@hidden>
References: 
 >Comment a block (From: David Blanton <email@hidden>)

  • Prev by Date: Re: clang 1.5 and property syntax?
  • Next by Date: Re: Comment a block
  • Previous by thread: Comment a block
  • Next by thread: Re: Comment a block
  • Index(es):
    • Date
    • Thread