I'm having the hardest time getting CoffeeTags to run in Vim.

As the website suggests, I've installed the CoffeeTags gem and appended the configuration to my ~/.vimrc. When I open Tagbar it's empty.

Here's a screenshot summarizing the problem:

Am I missing something? I'm running Ruby 1.9.2, Vim 7.3, CoffeeScript 1.1.3, and Node.js 0.6.2. and OS X Lion.

link|improve this question
feedback

2 Answers

The most likely explanation is that your filetype is set incorrectly. Try :set filetype? in one of your coffeescript buffers. The configuration that the gem creates assumes that the filetype is set to coffee, so if that's not the case for you then it won't work. In that case add a line like this to your vimrc:

autocmd BufNewFile,BufReadPost *.coffee setfiletype coffee

Maybe I should add a note about that in an empty Tagbar window...

link|improve this answer
Please do add that note: We love extra information! – Simon Sheehan Dec 2 '11 at 23:47
Odd, still no luck. :set filetype definitely returns filetype=coffee yet the Tagbar window remains empty. I'm so stumped with this. – Roshambo Dec 4 '11 at 0:30
Hm, then I can't think of anything specific offhand. Have you tried calling coffeetags manually to see whether it actually generates tags for your file? Is it in your $PATH? Is your vimrc available somewhere? – Jan Larres Dec 5 '11 at 8:00
CoffeeTags at the commandline seems to be generating tags properly and it's in my path. Here's my .vimrc and .gvimrc. – Roshambo Dec 5 '11 at 20:09
feedback
up vote -1 down vote accepted

It turns out that it was Ruby. As far as I can tell, CoffeeTags doesn't work in Ruby 1.9. After switching to Ruby 1.8 CoffeeTags worked flawlessly.

I verified this on OS X 10.7.2 running rvm and Arch Linux not running rvm.

link|improve this answer
For what it's worth, CoffeeTags does work with Ruby 1.9. I just verified this myself, though that still doesn't get to the root of your problem. – Marcus V. Apr 10 at 18:15
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.