[Vim-latex-devel] taglist.vim integration
Brought to you by:
srinathava,
tmaas
From: <mi...@wp...> - 2003-09-22 09:25:27
|
Hello, I'd like to add better support for ctags and taglist.vim (as the best interface for this feature). Currently creating of tags file is made with ltags perl script. But this of course requires perl in situation when this is not necessary. Ctags can create tags file depending on options given as configuration file or command line options. Inspired by Florent Manens Tip #453 I inserted this section to main.vim and everything works without changing or adding anything to non-latexSuite files! " ======================================================== ====================== " Settings for taglist.vim plugin " ======================================================== ====================== " Inspiration Florent Manens Tip #453 if !exists("g:tlist_tex_settings") let g:tlist_tex_settings = 'tex;s:section;c:chapter;l:label;r:ref' endif if exists("Tlist_Ctags_Cmd") let s:tex_ctags = Tlist_Ctags_Cmd else let s:tex_ctags = 'ctags' " Configurable in texrc? endif let Tlist_Ctags_Cmd = s:tex_ctags ." --langdef=tex -- langmap=tex:.tex.ltx.latex" \.' --regex-tex="/\\\\subparagraph[ \t]*\*?\{[ \t]*([^}]*)\}/- \1/p,subparagraph/"' \.' --regex-tex="/\\\\paragraph[ \t]*\*?\{[ \t]*([^}]*)\}/+ \1/p,paragraph/"' \.' --regex-tex="/\\\\subsubsection[ \t]*\*?\{[ \t]*([^}]*)\}/+ \1/s,subsubsection/"' \.' --regex-tex="/\\\\subsection[ \t]*\*?\{[ \t]*([^}]*)\}/+\1/s,subsection/"' \.' --regex-tex="/\\\\section[ \t]*\*?\{[ \t]*([^}]*)\}/\1/s,section/"' \.' --regex-tex="/\\\\chapter[ \t]*\*?\{[ \t]*([^}]*)\}/\1/c,chapter/"' \.' --regex-tex="/\\\\part[ \t]*\*?\{[ \t]*([^}]*)\}/\1/p,part/"' \.' --regex-tex="/\\\\label[ \t]*\*?\{[ \t]*([^}]*)\}/\1/l,label/"' \.' --regex-tex="/\\\\ref[ \t]*\*?\{[ \t]*([^}]*)\}/\1/r,ref/"' " ------------------------------------------------------- It could be of course placed in texrc to be better accessible by end-user. But before final commitment here are few things to discuss: 1. This is calling external command - eternal problems with quoting. Srinath - could you test it on Windows? 2. Pluses and spaces are for creating "structure". We could go further and make something more like in slrn or mutt with "real" trees for sectioning structure. This chars are in extended ASCII - may cause problems. 3. Of course: what tags should be included? ltags has: cite, citeonline - are these really useful? label bibliography bibitem, @....{ I'd like to make: As far as possible full sectioning structure abstract,part,chapter,section,subsection,subsubsection,paragraph,subparagra ph appendix,bibliography,thebibliography,bibitem frontmatter,mainmatter,backmatter? label, I don't think things like cite, ref and so on are useful. Other opinions? Maybe \captions? This is not core LaTeX element as \label but more readable for user when he wants to jump to specific element? Tested with latest taglist.vim (2.8) and ctags 5.5.2 (should work >=5.0) Unfortunately I am cutted off from CVS. Srinath, if you like it commit it in this form or after changes. m. ps. Maybe we should create "insitution" like official LaTeX-Suite plugins? Provide better interfaces for them and so on? Current candidates: Spellchecing: engspchk, vimspell Tags: taglist Any other ideas? |