Skip to content

Commit

Permalink
add Tagbar settings
Browse files Browse the repository at this point in the history
  • Loading branch information
gfx committed Jul 9, 2012
1 parent 54309c3 commit 485bb9b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 6 deletions.
7 changes: 7 additions & 0 deletions ctags/jsx.conf
@@ -0,0 +1,7 @@
--langdef=JSX
--langmap=jsx:.jsx
--regex-jsx=/^[ \t]*import[ \t]+([^;]+)/\1/r,import,imports/
--regex-jsx=/^[ \t]*([a-z]+[ \t]+)*function[ \t]+([A-Za-z0-9_]+[ \t]*[^{;]*)/\2/f,function,functions/
--regex-jsx=/^[ \t]*([a-z]+[ \t]+)*class[ \t]+([A-Za-z0-9_]+)[ \t]*([^)])/\2/c,class,classes/
--regex-jsx=/^[ \t]*([a-z]+[ \t]+)*interface[ \t]+([A-Za-z0-9_]+)[ \t]*([^)])/\2/i,interface,interfaces/
--regex-jsx=/^[ \t]*([a-z]+[ \t]+)*mixin[ \t]+([A-Za-z0-9_]+)[ \t]*([^)])/\2/m,mixin,mixins/
6 changes: 0 additions & 6 deletions extras/ctags

This file was deleted.

29 changes: 29 additions & 0 deletions ftplugin/jsx.vim
Expand Up @@ -3,4 +3,33 @@
" URL: http://github.com/jsx/jsx.vim
" License: MIT License
"

setlocal omnifunc=jsx#complete

" Tagbar http://majutsushi.github.com/tagbar/
let g:tagbar_type_jsx = {}
let g:tagbar_type_jsx.ctagstype = "jsx"
let g:tagbar_type_jsx.kinds = [
\ 'r:imports',
\ 'i:interfaces',
\ 'm:mixins',
\ 'c:classes',
\ 'f:functions'
\ ]
let g:tagbar_type_jsx.sro = '.'

"let g:tagbar_type_jsx.kind2scope = {
" \ 'i' : 'interface',
" \ 'm' : 'mixin',
" \ 'c' : 'class'
"\ }
"let g:tagbar_type_jsx.scope2kind = {
" \ 'interface' : 'i',
" \ 'mixin' : 'm',
" \ 'class' : 'c'
"\ }

let g:tagbar_type_jsx.sort = 0
let g:tagbar_type_jsx.deffile = expand('<sfile>:p:h:h') . '/ctags/jsx.conf'
" End of Tagbar setting

0 comments on commit 485bb9b

Please sign in to comment.