Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
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. –  Martin Scharrer May 1 '12 at 5:20
    
i'm running on ubuntu –  Reuben L. May 1 '12 at 5:21

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer
    
argh can't believe i made such a stupid mistake haha! trying to add environments after \end{document}! thanks! –  Reuben L. May 1 '12 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 '12 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 '12 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 '12 at 6:06
    
@ReubenL. could you share how you fixed that problem? I'm inside the document env, but the expansion is wrong. –  Sebastian Aug 5 at 7:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.