Thread: [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? |
From: Luc H. <her...@fr...> - 2003-09-23 12:57:44
|
* On Mon, Sep 22, 2003 at 11:45:28AM +0200, mi...@wp... <mi...@wp...> wrote: > 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. Why don't you use aux2tags.vim ? It works very well to generate the tags. And it doesn't require ctags or any other external tool but LaTeX. However, it does not present any information ; and presenting the structure of the document as a tree sounds a great idea! > ps. Maybe we should create "insitution" like official LaTeX-Suite > plugins? Provide better interfaces for them and so on? > Current candidates: > Spellchecing: engspchk, vimspell Nothing has to be done to integrate a spellchecker with LaTeX-suite and vice-versa. [BTW, i definitively prefer lh-vimspell [1] ;-) which works correctly which Aspell under MsWindows] -- Luc Hermitte [1] http://hermitte.free.fr/vim/ressources/vimfiles/doc/VS_help.html |
From: Srinath A. <sr...@fa...> - 2003-09-24 07:48:24
|
Hi Luc, On Tue, 23 Sep 2003, Luc Hermitte wrote: > Nothing has to be done to integrate a spellchecker with LaTeX-suite and > vice-versa. > [BTW, i definitively prefer lh-vimspell [1] ;-) > which works correctly which Aspell under MsWindows] > > -- > Luc Hermitte > [1] http://hermitte.free.fr/vim/ressources/vimfiles/doc/VS_help.html I wanted to give vhspell a quick try but unfortunately, there were a few bugs. I followed the installation instructions best I could... I downloaded vim-spell.tar.gz into my ~/vimfiles directory, tar xvzf'ed it and then cp'ed the macros/lhVimSpell.vim file into my ~/vimfiles/plugin directory. I then opened a new text file and pressed <F4> and got the following errors: ----------------------------------%<---------------------------------- E492: Not an editor command: :SearchInRuntime :VSSearchSyn syntax/.vim line 12: E121: Undefined variable: s:SearchSynFile E15: Invalid expression: '' != s:SearchSynFile line 11: E492: Not an editor command: :SearchInRuntime :VSSearchSyn syntax/.vim line 12: E121: Undefined variable: s:SearchSynFile E15: Invalid expression: '' != s:SearchSynFile line 11: E492: Not an editor command: :SearchInRuntime :VSSearchSyn syntax/.vim line 12: E121: Undefined variable: s:SearchSynFile E15: Invalid expression: '' != s:SearchSynFile line 11: E492: Not an editor command: :SearchInRuntime :VSSearchSyn syntax/.vim line 12: E121: Undefined variable: s:SearchSynFile E15: Invalid expression: '' != s:SearchSynFile ----------------------------------%<---------------------------------- There are actually lots more such errors which keep repeating, but they look like they are caused by the same basic thing. BTW, I got the .tar.gz file from the location indicated in http://hermitte.free.fr/vim/ressources/vimfiles/doc/VS_help.html namely I got the archive http://hermitte.free.fr/vim/ressources/vim-spell.tar.gz BTW, the screenshot looks pretty cool. Srinath |