简体   繁体   中英

How do I generate a ctags file for a docset? (For vim)

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.

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 :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM