- Install Homebrew if you haven't.
brew install ctags. The version of ctags that ship of OS X is an antique.
echo "--langdef=objc" >> ~/.ctags && echo "--langmap=objc:.m" >> ~/.ctags && echo "--regex-objc=/^[\t ]*(\-|\+)[\t ]*\([_a-zA-Z0-9][_a-zA-Z0-9]*\)([_a-zA-Z0-9][_a-zA-Z0-9]*)/\2/f/" >> ~/.ctags
- cd to the directory to write the tags file in
ctags -R mytargetdirectory
- Press ^] in MacVim over a function name to go to declaration/definitions
PS: Creating the .ctags file is so convoluted because I can't figure out how to put a multiliner without ruining the formatting in the instructions.
Like this post? Follow me @hboon on Twitter.