commit 33330316446780aa0fedeb51dc2a6b10736b1987
parent 05a3ddf150cc79fbf21ab7444a3edbfcc1fe96b7
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Thu, 5 Sep 2019 13:11:34 -0400
vim: tags for (s)css
Former-commit-id: dbef51c27c7145185befac83605b60d21491ff85
Diffstat:
3 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/ctags.d/css.ctags b/ctags.d/css.ctags
@@ -0,0 +1,14 @@
+--exclude=*.min.js
+--exclude=*.min.css
+--exclude=*.map
+--exclude=.backup
+--exclude=.sass-cache
+--exclude=vendors
+--exclude=.git
+
+--langmap=css:+.sass
+--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/
+
diff --git a/ctags.d/scss.ctags b/ctags.d/scss.ctags
@@ -0,0 +1,22 @@
+--exclude=*.min.js
+--exclude=*.min.css
+--exclude=*.map
+--exclude=.backup
+--exclude=.sass-cache
+--exclude=vendors
+--exclude=.git
+
+--langdef=scss
+--langmap=scss:.scss
+--regex-scss=/^[ \t]*@mixin ([A-Za-z0-9_-]+)/\1/m,mixin,mixins/
+--regex-scss=/^[ \t]*\$([A-Za-z0-9_-]+)/\1/v,variable,variables/
+--regex-scss=/^([A-Za-z0-9_-]*)*\.([A-Za-z0-9_-]+) *[,{]/\2/c,class,classes/
+--regex-scss=/^[ \t]+\.([A-Za-z0-9_-]+) *[,{]/\1/c,class,classes/
+--regex-scss=/^(.*)*\#([A-Za-z0-9_-]+) *[,{]/\2/i,id,ids/
+--regex-scss=/^[ \t]*#([A-Za-z0-9_-]+)/\1/i,id,ids/
+--regex-scss=/(^([A-Za-z0-9_-])*([A-Za-z0-9_-]+)) *[,|\{]/\1/t,tag,tags/
+--regex-scss=/(^([^\/\/])*)[ \t]+([A-Za-z0-9_-]+)) *[,|\{]/\3/t,tag,tags/
+--regex-scss=/(^(.*, *)([A-Za-z0-9_-]+)) *[,|\{]/\3/t,tag,tags/
+--regex-scss=/(^[ \t]+([A-Za-z0-9_-]+)) *[,|\{]/\1/t,tag,tags/
+--regex-scss=/^[ \t]*@media\s+([A-Za-z0-9_-]+)/\1/d,media,media/
+--regex-scss=/^[ \t]*%([A-Za-z0-9_-]+)/\1/p,placeholder,placeholders/
diff --git a/vim/vimrc b/vim/vimrc
@@ -164,6 +164,21 @@ let g:tagbar_type_markdown = {
\ ],
\ 'sort': 0
\ }
+
+let g:tagbar_type_scss = {
+ \ 'ctagstype' : 'scss',
+ \ 'kinds' : [
+ \ 'm:Mixins',
+ \ 'f:Functions',
+ \ 'v:Variables',
+ \ 'c:Classes',
+ \ 'i:IDs',
+ \ 't:Tags',
+ \ 'd:Media',
+ \ 'p:Placeholders'
+ \ ],
+ \ 'sort': 0
+ \ }
" }}}
" Doge {{{
let g:doge_mapping = '<leader>gd'