Sign in
Log inSign up

Ctags mac Vim

Aditya Varma's photo
Aditya Varma
·Aug 4, 2018

Install ctags in vim using home brew brew install ctags I have set up this mapping in my vimrc file for the ctags

map <C-F12> :!ctags -R --exclude=.git --exclude=logs --exclude=doc . <CR> I just press ctrl + fn + f12 and voilla I can use ctrl + ] to go the definition of function in a rails project.

The above did not find do tagging for gem specific functions. I had to add bundle list --paths to the above line as well. So now I have a new mapping which is something like this map <C-F12> :!ctags -R --exclude=.git --exclude=logs --exclude=doc . $(bundle list --paths)<CR> Now I go to a gem specific function and type ctrl + ] and voila I have migrated to the gem file and now I can have a look at the gem source.

useful links: blog.sensible.io/2014/05/09/supercharge-yo… andrew.stwrt.ca/posts/vim-ctags

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct