You are not logged in.

#1 2010-10-07 07:00:04

Barghest
Member
From: Hanau/Germany
Registered: 2008-01-03
Posts: 563

vim latex-suite: I'm on another file after compiling

Hi,

a little thing that bothers me when using latex in vim:

After using \ll to compile the file using latexmk vim opens the master document so I have to open the old file manually to keep working.

Any idea how to change this?

Offline

#2 2010-10-07 19:33:36

moose jaw
Member
From: Milwaukee
Registered: 2007-08-20
Posts: 104

Re: vim latex-suite: I'm on another file after compiling

I use vim-latexsuite all the time and haven't had this issue. Can you post your ~/.vim/ftplugin/tex.vim and/or the .latexmain file associated with the project you're working on? The problem is likely in one of those places. Also, you should make sure that you haven't made any alterations to files in the latex-suite directory, e.g., ~/.vim/ftplugin/latex-suite/compiler.vim

Offline

#3 2010-10-07 20:23:29

Barghest
Member
From: Hanau/Germany
Registered: 2008-01-03
Posts: 563

Re: vim latex-suite: I'm on another file after compiling

Neither do I have a folder ftplugin in ~/.vim nor does the .latexmain file contain anything. I've also looked in /usr/share/vim/vimfiles but couldn't found anything. And I'm very sure I didn't touch any file here.

Offline

#4 2010-10-07 20:35:22

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: vim latex-suite: I'm on another file after compiling

I experienced something similar - yet not with latex suite - when I used a vim session file over a longer time period. Starting over from scratch and saving everything as a new vim session did solve the problem. Apparently some kind of "context switches" tend to accumulate in a vim session file resulting in unwanted side effects.

Other than that I routinely work with larger tex documents split up in a dozen subfiles and never had such a problem.

Last edited by bernarcher (2010-10-07 20:38:08)


To know or not to know ...
... the questions remain forever.

Offline

#5 2010-10-07 21:18:33

Barghest
Member
From: Hanau/Germany
Registered: 2008-01-03
Posts: 563

Re: vim latex-suite: I'm on another file after compiling

Ok, I'll give your suggestion a try.

Offline

#6 2010-10-08 02:51:54

moose jaw
Member
From: Milwaukee
Registered: 2007-08-20
Posts: 104

Re: vim latex-suite: I'm on another file after compiling

Barghest wrote:

Neither do I have a folder ftplugin in ~/.vim nor does the .latexmain file contain anything. I've also looked in /usr/share/vim/vimfiles but couldn't found anything. And I'm very sure I didn't touch any file here.

I see. vim-latexsuite uses the same '\ll' command for compilation, so I simply assumed that you were using it. In any case, if other fixes don't work, you might try installing vim-latexsuite (which they recommend be installed under ~/.vim/ftplugin) to see if that makes a difference, and also if you are interested in the other fairly nice features it has (code snippets, \ref and \cite help, etc.). It's not quite as full-featured as auctex for emacs, but then, it works with vim, which is a plus!

Offline

#7 2010-10-08 06:51:35

Barghest
Member
From: Hanau/Germany
Registered: 2008-01-03
Posts: 563

Re: vim latex-suite: I'm on another file after compiling

I already use vim-latexsuite and all its nice features like \cite completion and so on. I installed it (via AUR?) in March

$ powerpill -Qs latexsuite
local/vim-latexsuite 20100129-2 (vim-plugins)

Last edited by Barghest (2010-10-08 06:52:07)

Offline

#8 2010-10-08 14:13:04

moose jaw
Member
From: Milwaukee
Registered: 2007-08-20
Posts: 104

Re: vim latex-suite: I'm on another file after compiling

Barghest wrote:

I already use vim-latexsuite and all its nice features like \cite completion and so on. I installed it (via AUR?) in March

$ powerpill -Qs latexsuite
local/vim-latexsuite 20100129-2 (vim-plugins)

I see, I didn't realize it was in AUR. I just installed the vimball directly into my .vim folder.  From glancing at latex-suite's compiler.vim, it looks like latex-suite expects all of its function definitions to be in the same place as your personal tex.vim config file (they're all relative to $VIMRUNTIME, it seems). If your tex.vim is in your .vim folder and the latex-suite files like compiler.vim are elsewhere (as they probably are, if they were installed by pacman), then maybe latex-suite is becoming confused and causing the error you mentioned? I'm obviously not much of a coder/vim internals person, and I don't know the precise layout of the files installed by the AUR version of latexsuite, so this is mostly speculation; maybe others who are more knowledgeable can weigh in. But you might try uninstalling your AUR latexsuite and downloading and installing the latexsuite vimball directly into your ~/.vim/ftplugin, and see if that solves the problem.

Offline

#9 2010-10-08 15:37:30

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: vim latex-suite: I'm on another file after compiling

I had latex-suite installed from AUR for some time but dropped it (for some reason I forgot) in favour of the vimball. Although I doubt your problems stem from the AUR package you may want to try this, too.

The place of the compiler/tex.vim file should make no difference, however. It should be most likely in the ~/.vim folder actually because it contains the user configuration defs.


To know or not to know ...
... the questions remain forever.

Offline

#10 2010-10-08 15:58:50

frabjous
Member
Registered: 2010-07-13
Posts: 367

Re: vim latex-suite: I'm on another file after compiling

I dropped the LaTeX-suite, which I thought was too complicated (and hence made composing more rather than less difficult), in favor of the LaTeX-box plugin, but one thing I would check is whether or not there are any errors in the document. Perhaps LaTeX suite is trying to show you where the error is?

Offline

Board footer

Powered by FluxBB