tags:

views:

367

answers:

1

I'd like to be able to use ctags to browse the apple iphone sdk docsets with vim. Is there a way to generate a ctags file that links to the docsets in question?

I use Objective-C to program for the iPhone, so I ended up using Objective-C Ctags, and changed my commandline to be:

ctags -f iPhone.tags -R --langmap="ObjC:.m .h" --fields=+ias --extra=+q /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/Frameworks/

Also, the + and - of the methods get into the tags, and since you don't use them in the code, I had to strip them from the generated tags file.

+1  A: 

i use several system-wide sdk's and create a tags file for each of them, eg:

%> ctags -f qt4.tags -R --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ /Library/Frameworks/Qt*

such created tag files are placed then into a subfolder called 'tags' underneath my vim folder. then i add some stuff to my .vimrc:

let &tags="tags;./tags"
let s:tfs=split(globpath(&rtp, "tags/*.tags"),"\n")
for s:tf in s:tfs
   let &tags.=",".expand(escape(escape(s:tf, " "), " "))
endfor

and .. thats it.

i use exuberant ctags for creating the tags, on windows i use the precompiled binaries, on mac i use macports and on linux i use just the packages :)

akira
Did you compile your own ctags? The provided BSD ctags doesn't support -R
Douglas Mayle
@Douglas Mayle: what do you mean by "provided"? as i said: i use ctags coming from macports on the mac.
akira
I mean that OSX has ctags built in. You're using a custom compiled ctags (the macports ctags)
Douglas Mayle