Are there any alternatives to ctags and cscope with Objective-c support. This does pertain to cocoa development, so inevitably it seems I will be using Xcode (and probably should). I was just wondering what are my Vim options.
Maybe there is some type of plugin system like eclim, but for xcode?
EDIT
So it seems that other than updating ctags to support objective-c, I'm out of luck. Does anyone know if cscope is the same?
If I am not wrong :
I have to recompile ctags (https://sourceforge.net/p/ctags/code/HEAD/tree/) by commenting all of the property keyword processing in
ObjC.c
as a workaround. Even though, it only helps to get a little better for reading source code in the Taglist.It still can't jump (e.g. to the implementation methods with parameters) correctly.
I also tried this(https://github.com/mcormier/ctags-ObjC-5.8.1), but unfortunately this can't jump at all.
Summary : there seems no ctags for ObjC as workable as for C/C++.
There is an option to use ctags for objective-c. You can use etags in ctags mode. etags derived from ctags some time ago, and in its source code ctags compatible tags will be generated by defining a certain macro switch.
In fact the man page in Mac Os already documents etags and ctags in the same page. It states that objective-c is supported in ctags. You should be able to generate a tag file using the following command: ctags -l objc *.[mh]
Unfortunately the ctags program in Mac OS behaves not as documented since Apple messed it up. I however managed to install this kind of ctags using Ubuntu Linux and it works great!!! There you have to install the emacs22-bin-common package.
So under Mac OS all you have to do is to compile this package for yourself.
You are done. Happy tagging!!!
a long time after this question, "playing" with vim, I wanted ObjC support, especially with taglist plugin. I found that question, then digged a bit, and here is a not so dirty solution:
You can easily install it on OSX via homebrew:
$ brew install ctags --HEAD
Note that when using ctags,
.m
is treated as Matlab and.h
is treated as C++. To override, use:$ ctags --langmap=ObjectiveC:.m.h
Then I added something like this to my
.vimrc
for taglist support:let tlist_objc_settings = 'ObjectiveC;P:protocols;i:interfaces;types(...)'
add any type interests you from that list:
I hope that will help someone!
Universal-ctags(https://ctags.io) can capture properties of Objective-C.
I found it difficult getting ctags to generate tags for tagbar. It was easier to use a vim plugin for the Objective-C editor. XVim works with XCode. If you use Appcode like me, IdeaVim is well integrated.
Though you won't get to full Vi/Vim functionality with the plugin. I find mix usage with native IDE commands is enough to compensate.
AFAIK, ctags support you to define some rules for a new language, I did that when I did some development using laszlo(similiar to flex). You can read the manpage of ctags to get more details, that is not hard to do.
I find there is a vim filetype plugin that support development under cocoa here, hope it is helpful for you.