XCode HeaderDocs

Okay, so I got fed up with XCode’s default headerdoc format.  And how NOTHING was showing up in all the C++ code libraries I use.

So, I changed it. Here’s the details so you can to!

$ cd /Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/Resources
$ cp C.xclangspec C.xclangspec.bkup
$ vim C.xclangspec

In the file, search with /MARK: HeaderDoc to find the right section. I changed the following:

/****************************************************************************/
// MARK: HeaderDoc
/****************************************************************************/

{

Identifier = "xcode.lang.comment.headerdoc";
BasedOn = "xcode.lang.comment"; // for text macros only
Syntax = {

// SJF 3/1/2011 changed to work with Equalizer
Start = "/**";
End = "*/";
Foldable = YES;
IncludeRules = (
"xcode.lang.comment.headerdoc.keywords",
"xcode.lang.url",
"xcode.lang.url.mail",
"xcode.lang.comment.mark"

);

Type = "xcode.syntax.comment.doc";

};

},

{

Identifier = "xcode.lang.comment.headerdoc.keywords";
Syntax = {

StartChars = "@";
Chars = "abcdefghijklmnopqrstuvwxyz";
// SJF 3/1/2011 changed to work with equalizer
Words = (
"@abstract",
"@callback",
"@category",
"@class",
"@const",
"@constant",
"@defined",
"@discussion",
"@enum",
"@field",
"@function",
"@header",
"@method",
"@param",
"@property",
"@protocol",
"@result",
"@struct",
"@thread",
"@typedef",
"@union",
"@var",
"@return",
);

Type = "xcode.syntax.comment.doc.keyword";

};

},

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.