I've already configured ctags to index css files like documented here: vim-tagbar-css

Also tagbar already works with configuration provided at: tagbar-css.vim

Still CtrlP doesn't show any tags inside of a css file in "buffer tags" mode. Other files like PHP are working fine.

Where can I find more information to make it work, or how can I make it work?

  • I would start by asking on their issue tracker and reading the docs, like this one - those variables may be useful
    – grodzik
    Commented Apr 26, 2017 at 13:20
  • Use vim-css3-syntax. The plugin you are using seems old and unmaintained...
    – mike
    Commented Apr 26, 2017 at 13:25
  • Thanks @grodzik found the docs but didn't think defining own type would be necessary. Worked for me thank you.
    – Daniel
    Commented Apr 26, 2017 at 13:39

1 Answer 1


All I had to do was to configure the css type for ctrlp to complete the ctags kinds, as mentioned in the docs, thanks @grodzik:

let g:ctrlp_buftag_types = {
\ 'css' : '--css-types=vcitm',
\ }

This configures to complete the ctags kinds "v", "c", "i", "t" and "m", They are configured in ctags:

--regex-css=/^[ \t]*@([A-Za-z0-9_-]+)/@\1/v,var,variables/
--regex-css=/^[ \t]*\.([A-Za-z0-9_-]+)/.\1/c,class,classes/
--regex-css=/^[ \t]*#([A-Za-z0-9_-]+)/#\1/i,id,ids/
--regex-css=/^[ \t]*(([A-Za-z0-9_-]+[ \t\n,]+)+)\{/\1/t,tag,tags/
--regex-css=/^[ \t]*@media\s+([A-Za-z0-9_-]+)/\1/m,media,medias/

As already mentioned in the question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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