1

I'm experiencing a very slow startup of gvim with tex files and the latex-suite plugin. For example, opening this tex file takes 7 seconds. A minimal .vimrc file only contains the following line:

filetype plugin on

My .vim folder only contains the latex-suite plugin (snapshot 2013-01-16). I suspect the folding functionality in latex-suite but I'm not sure how to track this down properly and fix it. I'm running gvim 7.3 on Ubuntu 12.10.

Does anybody know how to fix this slow startup?

andrenarchy
  • 448
  • 3
  • 12

2 Answers2

0

If the problem is related to the filetype (as you've already determined), the slowness should also happen when you :edit the file from within a running Vim, or even when you reload the Tex file via :e!. I'd use that to investigate the root cause. If you suspect folding, :setl foldmethod=manual or :setl nofoldenable would be a first attempt.

Since you've already isolated the problem down to the plugin, I would recommend to direct any feedback and problem reports to its author; even if you get a fix or workaround here, it still should flow back into the plugin.

Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324
  • Yes, the slow loading also occurs when a tex file is loaded from within an already running gvim. However, `:setl foldmethod=manual` or `:setl nofoldenable` does not change the behavior. – andrenarchy Feb 22 '13 at 13:55
  • You could try turning off the syntax, checking the autocmds, capturing what's happening with `:set verbose=20`, or even `:profile`, but I'd submit this issue to the author first. – Ingo Karkat Feb 22 '13 at 14:22
  • thx, I reported the issue on the [development mailing list](https://lists.sourceforge.net/lists/listinfo/vim-latex-devel). Btw, `gvim --startuptime startup.log funcall.tex` results in [this log](http://pastebin.com/54dtJTvt) where the slow startup can be tracked down to the latex-suite plugin. – andrenarchy Feb 25 '13 at 09:40
0

latex-suite seems to do some kind of package scanning which I disabled by setting

let g:Tex_PackagesMenu = 0

in my .vimrc. This reduces the startup time to 3.5s (from 7s) and I think I can live with this ;).

andrenarchy
  • 448
  • 3
  • 12