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 am using vim-latex. I compile TeX document using \ll command, then \lv to view it. It generates a PDF file. So far, so good. The problem starts when I try to modify my TeX file and compile it again with \ll. I get an error:

I can't write on "filename".

I have to close the previously generated PDF file in order to compile again. How can I avoid this and make vim to refresh the PDF file? Any suggestions?

share|improve this question
2  
If you are using Adobe Reader it locks the file; If you are on Windows switch to Sumatra PDF. I don't know what linux PDF readers lock the file, but you should try switching to a different one. –  Canageek Jul 25 '12 at 20:28
add comment

1 Answer 1

up vote 6 down vote accepted

If you are using Adobe Reader or certain other PDF readers it locks the file.

I don't know what OS you are on, but based on discussion in the chatroom Reader only locks the file on Windows. If you are indeed on Windows switch to Sumatra PDF, which does not lock the file.

I don't know what linux or Mac PDF readers lock the file, but you should try switching to a different one, as this is likely a PDF reader problem, not a vim-problem.

share|improve this answer
    
Thank you for the quick response. Yes, indeed, i am using Adobe and i have Windows 7. Your suggestion for Sumatra PDF worked. Still it makes me wonder why Adobe locks the file. I was using TexnicCenter with Adobe before and it was compiling and updating the files without at the same time, no locking. –  slv Jul 25 '12 at 23:19
    
Remember to accept the answer. I don't know how TexnicCenter got away with it, but this is a common problem. –  Canageek Jul 26 '12 at 0:08
add comment

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.