title: Using vims tagbar plugin for latex files
body: <p>I am currently trying to make vim's tagbar plugin to work with latex files on Mac OS X.</p>
  
  <p>This is my ~/.ctags file:</p>
  
  <pre><code>--langdef=latex
  --langmap=latex:.tex
  --regex-latex=/^\\tableofcontents/TABLE OF CONTENTS/s,toc/
  --regex-latex=/^\\frontmatter/FRONTMATTER/s,frontmatter/
  --regex-latex=/^\\mainmatter/MAINMATTER/s,mainmatter/
  --regex-latex=/^\\backmatter/BACKMATTER/s,backmatter/
  --regex-latex=/^\\bibliography\{/BIBLIOGRAPHY/s,bibliography/
  --regex-latex=/^\\part[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/PART \2/s,part/
  --regex-latex=/^\\part[[:space:]]*\*[[:space:]]*\{([^}]+)\}/PART \1/s,part/
  --regex-latex=/^\\chapter[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/CHAP \2/s,chapter/
  --regex-latex=/^\\chapter[[:space:]]*\*[[:space:]]*\{([^}]+)\}/CHAP \1/s,chapter/
  --regex-latex=/^\\section[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/\. \2/s,section/
  --regex-latex=/^\\section[[:space:]]*\*[[:space:]]*\{([^}]+)\}/\. \1/s,section/
  --regex-latex=/^\\subsection[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/\.\. \2/s,subsection/
  --regex-latex=/^\\subsection[[:space:]]*\*[[:space:]]*\{([^}]+)\}/\.\. \1/s,subsection/
  --regex-latex=/^\\subsubsection[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/\.\.\. \2/s,subsubsection/
  --regex-latex=/^\\subsubsection[[:space:]]*\*[[:space:]]*\{([^}]+)\}/\.\.\. \1/s,subsubsection/
  --regex-latex=/^\\includegraphics[[:space:]]*(\[[^]]*\])?[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/\3/g,graphic+listing/
  --regex-latex=/^\\lstinputlisting[[:space:]]*(\[[^]]*\])?[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/\3/g,graphic+listing/
  --regex-latex=/\\label[[:space:]]*\{([^}]+)\}/\1/l,label/
  --regex-latex=/\\ref[[:space:]]*\{([^}]+)\}/\1/r,ref/
  --regex-latex=/\\pageref[[:space:]]*\{([^}]+)\}/\1/p,pageref/
  </code></pre>
  
  <p>and this is the corresponding part in my ~/.vimrc:</p>
  
  <pre><code>let g:tagbar_type_tex = {
      \ 'ctagstype' : 'latex',
      \ 'kinds'     : [
          \ 's:sections',
          \ 'g:graphics:0:0',
          \ 'l:labels',
          \ 'r:refs:1:0',
          \ 'p:pagerefs:1:0'
      \ ],
      \ 'sort'    : 0,
  \ }
  </code></pre>
  
  <p>I basically got all this from this link: <a href="https://github.com/vim-scripts/Tagbar/blob/master/doc/tagbar.txt" rel="nofollow">https://github.com/vim-scripts/Tagbar/blob/master/doc/tagbar.txt</a></p>
  
  <p>Unfortunately, when I start the tagbar, nothing happens and when I execute :UpdateTags I get the following error:</p>
  
  <pre><code>easytags.vim 3.7: Exuberant Ctags doesn't support the 'plaintex' file type! (at function xolox#easytags#update..&lt;SNR&gt;20_check_cfile, line 22)
  </code></pre>
  
  <p>ctags --version results in:</p>
  
  <pre><code>Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
    Compiled: Oct  1 2014, 16:18:15
    Addresses: &lt;dhiebert@users.sourceforge.net&gt;, http://ctags.sourceforge.net
    Optional compiled features: +wildcards, +regex
  </code></pre>
  
  <p>and "which ctags" in:</p>
  
  <pre><code>/usr/local/bin/ctags
  </code></pre>
  
  <p>When I execute ctags --verbose abstract.tex it finds the ~/.ctags file and generates this tag file:</p>
  
  <pre><code>!_TAG_FILE_FORMAT       2       /extended format; --format=1 will not append ;" to lines/
  !_TAG_FILE_SORTED       1       /0=unsorted, 1=sorted, 2=foldcase/
  !_TAG_PROGRAM_AUTHOR    Darren Hiebert  /dhiebert@users.sourceforge.net/
  !_TAG_PROGRAM_NAME      Exuberant Ctags //
  !_TAG_PROGRAM_URL       http://ctags.sourceforge.net    /official site/
  !_TAG_PROGRAM_VERSION   5.8     //
  . Abstract      abstract.tex    /^\\section*{Abstract}$/;"      s
  </code></pre>
  
  <p>The file itself looks like this:</p>
  
  <pre><code>\section*{Abstract}
  
  Let's see what we can do here...
  </code></pre>
  
  <p>What am I missing? :(</p>
  
  <p>Kind regards and thanks for your help :)</p>