└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # ctags-css 2 | 3 | CSS integration for ctags. Put these in `~/.ctags` 4 | 5 | ``` 6 | --langdef=css 7 | --langmap=css:.css 8 | --langmap=css:+.scss 9 | --langmap=css:+.sass 10 | --langmap=css:+.styl 11 | --langmap=css:+.less 12 | --regex-css=/^[ \t]*\.([A-Za-z0-9_]+-[A-Za-z0-9_-]+)( |$)/.\1/c,class,classes/ 13 | --regex-css=/^([\$@][A-Za-z0-9_-]+): /\1/v,variable,variables/ 14 | --regex-css=/^([A-Za-z0-9_-]+) = /\1/v,variable,variables/ 15 | --regex-css=/^[ \t]*(@mixin |= ?)([A-Za-z0-9_-]+)/\2/m,mixin,mixins/ 16 | ``` 17 | 18 | ## Customization 19 | 20 | The above snippet only indexes classes in [rscss] convention, ie, `.two-words-or-more`—indexing more classes than that is typically sluggish and overkill. But if you like overkill solutions, use: 21 | 22 | ``` 23 | --regex-css=/^[ \t]*\.([A-Za-z0-9_-])( |$)/.\1/c,class,classes/ 24 | ``` 25 | 26 | [rscss]: https://github.com/rstacruz/rscss 27 | --------------------------------------------------------------------------------