4

I'm new to vim-latex and have been reading some tutorials. I've noticed that the behaviour of the F5 on my machine is rather different from what the tutorials tell me.

I'm supposed to expect F5 to expand an environment (if the name of the env is typed) or to select from a list in order to expand.

However, all I am getting \usepackage{name of environment} being returned, which doesn't make sense to me of course since I'm trying to add environment tags and not a package.

Why is there such a deviation from the expected behaviour?

2
  • Which operation system are you using? Windows, Linux/Unix, Mac, ...? I noticed that the Vim shortcuts under Windows are different as under Linux, which is where Vim comes from. May 1, 2012 at 5:20
  • i'm running on ubuntu
    – Reuben L.
    May 1, 2012 at 5:21

1 Answer 1

4

If you press F5 when the cursor is located outside \begin{document}...\end{document}, latex-suite lets you add packages, i.e. it inserts \usepackage statements. Moving the cursor inside the document section should lead to the desired behavior.

4
  • argh can't believe i made such a stupid mistake haha! trying to add environments after \end{document}! thanks!
    – Reuben L.
    May 1, 2012 at 5:34
  • Oh no sorry to disappoint. I was a little hasty in accepting the answer but turns out the problem is still there even when I try it within the document tags.
    – Reuben L.
    May 1, 2012 at 5:45
  • 1
    turns out the issue is that the template had some erroneous tags which led vim-latex to believe that i was outside the document tags. in a way you were right so I'm still gonna give you the vote.
    – Reuben L.
    May 1, 2012 at 5:48
  • I'm glad to hear my guess was kind of helpful. It's true that latex-suite can easily be tricked by (broken) TeX/LaTeX constructs it doesn't expect at a specific location. Nonetheless, it usually does a great job.
    – Martin
    May 1, 2012 at 6:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .