From 9dc558fc433ae8b5b3aa3e7891be3ccc3bfb5170 Mon Sep 17 00:00:00 2001 From: Srinath Avadhanula Date: Thu, 16 Jan 2003 17:49:08 +0000 Subject: [PATCH] - Previously if a file which didn't have \usepackage{german} triggered latex-suite and then the user opened a file which did have \usepackage{german}, then b:Tex_SmartQuote* would not change. We want to process the \usepackage lines for every file... A first pass at implementing this. Make Tex_pack_updateall() get called every time SetTeXOptions() is called by catching the LatexSuiteInit event thrown by SetTeXOptions(). TODO: This makes things slow, because Tex_pack_updateall is kind of dumb updating the menu list... Often times, multiple files in the same vim session use the same main file. In this case, it doesn't make sense to "uncheck" all the menus and recreate them again. I'll optimize it later to use such information... --- ftplugin/latex-suite/packages.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ftplugin/latex-suite/packages.vim b/ftplugin/latex-suite/packages.vim index 489222d..8830435 100755 --- a/ftplugin/latex-suite/packages.vim +++ b/ftplugin/latex-suite/packages.vim @@ -453,4 +453,8 @@ if g:Tex_Menus endif +augroup LatexSuite + au LatexSuite User LatexSuiteInit call Tex_pack_updateall() +augroup END + " vim:fdm=marker:ts=4:sw=4:noet:ff=unix