vim-easytags
vim-easytags copied to clipboard
Multiple ctags maps
With the following ~/.ctags
:
--langdef=css
--langmap=css:.css
--langmap=css:+.scss
--langmap=css:+.sass
--langmap=css:+.styl
--langmap=css:+.less
--regex-css=/^[ \t]*(([A-Za-z0-9_-]+[ \t\n,]+)+)\{/\1/t,tag,tags/
--regex-css=/^[ \t]*#([A-Za-z0-9_-]+)/#\1/i,id,ids/
--regex-css=/^[ \t]*\.([A-Za-z0-9_-]+)/.\1/c,class,classes/
a *.less file appears as a valid mapping
➜ ctags --list-maps=css
css *.css *.scss *.sass *.styl *.less
Yet when I try to :UpdateTags
such a file, I get
easytags.vim 3.9.1: Exuberant Ctags doesn't support the 'less' file type! (at function xolox#easytag
s#update..<SNR>46_check_cfile, line 22)
Workaround: duplicate the ~/.ctags
definition of css, scss, sass, styl, and less, treating them as separate languages.
I have a similar problem with qml files. It's possible to use javascript ctag generation for them, so I have:
--langmap=JavaScript:+.qml
This fails the same way. I can get around the first problem by adding this:
let g:easytags_languages = { 'qml': { } }
But then it will fail on force-language command line option. If I comment out that line in easytags, it works.