Tagbar provide a sidebar in vim to show the tags from ctags of current file. But ctags doesn’t support coffeescript, so we have to add tag rules manually in ~/.ctags
or just add a config for tagbar, to make tagbar use CoffeeTags when we are editing file in coffeescript.
and add the following to .vimrc
:
if executable('coffeetags')
let g:tagbar_type_coffee = {
\ 'ctagsbin' : 'coffeetags',
\ 'ctagsargs' : '',
\ 'kinds' : [
\ 'f:functions',
\ 'o:object',
\ ],
\ 'sro' : ".",
\ 'kind2scope' : {
\ 'f' : 'object',
\ 'o' : 'object',
\ }
\ }
endif