Ches Martin avatar Ches Martin committed 1c51a3d

vim: Switch to TagBar from TagList

Comments (0)

Files changed (2)

.vim/include/tagbar-types.vim

+" I hate having these ugly hash literals in my main vimrc.
+
+" Alternatively, this probably works better than regex defs in ~/.ctags:
+"   https://github.com/lukaszkorecki/CoffeeTags
+let g:tagbar_type_coffee = {
+  \ 'ctagstype' : 'coffee',
+  \ 'kinds'     : [
+    \ 'c:classes',
+    \ 'm:methods',
+    \ 'f:functions',
+    \ 'v:variables',
+    \ 'f:fields',
+  \ ]
+\ }
+
+let g:tagbar_type_markdown = {
+  \ 'ctagstype' : 'markdown',
+  \ 'kinds' : [
+    \ 'h:Heading1',
+    \ 'i:Heading2',
+    \ 'k:Heading3'
+  \ ]
+\ }
+
+" In ctags trunk, but there hasn't been a release in 3 years...
+"   brew install ctags --HEAD
+let g:tagbar_type_objc = {
+  \ 'ctagstype' : 'ObjectiveC',
+  \ 'kinds'     : [
+    \ 'i:interface',
+    \ 'I:implementation',
+    \ 'p:Protocol',
+    \ 'm:Object_method',
+    \ 'c:Class_method',
+    \ 'v:Global_variable',
+    \ 'F:Object field',
+    \ 'f:function',
+    \ 'p:property',
+    \ 't:type_alias',
+    \ 's:type_structure',
+    \ 'e:enumeration',
+    \ 'M:preprocessor_macro',
+  \ ],
+  \ 'sro'        : ' ',
+  \ 'kind2scope' : {
+    \ 'i' : 'interface',
+    \ 'I' : 'implementation',
+    \ 'p' : 'Protocol',
+    \ 's' : 'type_structure',
+    \ 'e' : 'enumeration'
+  \ },
+  \ 'scope2kind' : {
+    \ 'interface'      : 'i',
+    \ 'implementation' : 'I',
+    \ 'Protocol'       : 'p',
+    \ 'type_structure' : 's',
+    \ 'enumeration'    : 'e'
+  \ }
+\ }
+
+let g:tagbar_type_rspec = {
+  \ 'ctagstype' : 'ruby',
+  \ 'kinds' : [
+    \ 'd:describe',
+    \ 'C:context'
+  \ ]
+\ }
+
+let g:tagbar_type_scala = {
+  \ 'ctagstype' : 'Scala',
+  \ 'kinds'     : [
+    \ 'p:packages:1',
+    \ 'V:values',
+    \ 'v:variables',
+    \ 'T:types',
+    \ 't:traits',
+    \ 'o:objects',
+    \ 'a:aclasses',
+    \ 'c:classes',
+    \ 'r:cclasses',
+    \ 'm:methods'
+  \ ]
+\ }
+
+let g:tagbar_type_vimwiki = { 'ctagstype' : 'vimwiki', 'kinds' : [ 'h:Headers' ] }
+
 
   let python_highlight_all = 1
 
-  " Taglist
-  let Tlist_Use_Right_Window        = 1
-  let Tlist_GainFocus_On_ToggleOpen = 1
-  let Tlist_Enable_Fold_Column      = 0
-  let Tlist_File_Fold_Auto_Close    = 1 " Fold all trees but current file
+  " TagBar
+  runtime include/tagbar-types.vim
+  let g:tagbar_autoclose = 1
+
   " Shifted version of NERDTree toggle
-  map <Leader>< :TlistToggle<CR>
-
-  let tlist_vimwiki_settings = 'vimwiki;h:Headers'
-  let tlist_objc_settings    = 'objc;i:interface;c:class;m:method;p:property'
+  map <Leader>< :TagbarToggle<CR>
 
   " NERDTree
   let NERDTreeWinPos          = 'right'
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.