Closed andreasschaab closed 3 months ago
I create a minimal
test.tex
file and make sure to runlatexmk -C test.tex
Running
vim test.tex
followed by\ll
compiles correctly and produces a PDF that is displayed in SkimBut then I modify the
.tex
file by adding a new line "Hello it's me". Pressing\ll
again yields "VimTeX: Compiler stopped (test.tex)"
Why did you press \ll
again? You don't need to. After you add a new line and then save the file with :w
, latexmk will recompile the file. The first \ll
will start latexmk
wich will run in the background and compile the file whenever it changes.
- When I then press
\ll
again a second time, it says "compilation completed" but the PDF has not been updated. This is the core of my issue. Skim still displays the original, unmodified PDF, and the PDF file itself also remains unaltered.
You need to save the file for it to recompile. It is not enough to just restart the compiler with \ll
.
I am new to all of this, so I apologize in advance if I am making a silly mistake.
No need to apologize - we are all new at some point. I'm happy to help!
.vimrc
file: …
If you use Vundle, it seems (from the main README of Vundle.vim) that you also need filetype off
after set nocompatible
. Next, you don't need to set VimTeX options unless you change them from their default value. And the general viewer is not relevant when you specify to use Skim. So, you should update your config to this:
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'lervag/vimtex'
call vundle#end()
filetype plugin indent on
syntax enable
" VimTeX settings
let g:vimtex_view_method = 'skim'
let g:vimtex_view_skim_sync = 1
let g:vimtex_view_skim_activate = 1
Pressing
\li
results in:Error detected while processing function vimtex#info#open[2]..vimtex#scratch#new[2]..224: line 4: E37: No write since last change (add ! to override)
This error message appears because \li
opens a new buffer and your previous buffer was modified and not saved. I strongly suggest that you add set hidden
in your vimrc and that you learn about buffers. See :help buffers
.
Thank you so, so much for these clarifications!!! I am genuinely so grateful that you took the time to answer. It's really kind of you and I really appreciate it. It's all working now. I updated my vimrc as you suggested. I want to apologize again for asking such a beginner question as I'm just getting started with all this. But again, thank you so so much :)
Thank you so, so much for these clarifications!!! I am genuinely so grateful that you took the time to answer. It's really kind of you and I really appreciate it. It's all working now. I updated my vimrc as you suggested. I want to apologize again for asking such a beginner question as I'm just getting started with all this. But again, thank you so so much :)
Glad to hear it was useful and appreciated! And good luck on your journey to learn Vim!
Description
My issue is simple to explain (and possibly related to Issue #496):
I create a minimal
test.tex
file and make sure to runlatexmk -C test.tex
Running
vim test.tex
followed by\ll
compiles correctly and produces a PDF that is displayed in SkimBut then I modify the
.tex
file by adding a new line "Hello it's me". Pressing\ll
again yields "VimTeX: Compiler stopped (test.tex)"When I then press
\ll
again a second time, it says "compilation completed" but the PDF has not been updated. This is the core of my issue. Skim still displays the original, unmodified PDF, and the PDF file itself also remains unaltered.I am new to all of this, so I apologize in advance if I am making a silly mistake. I've been looking at other related issues and tried reproducing suggested solution steps, but after two days testing this it doesn't work. Thank you SO much in advance for any help!
Steps to reproduce
Modified
.tex
file:.vimrc
file:I also add the output of
\lo
after the second\ll
(which says it compiled):Pressing
\li
results in:Expected behavior
PDF should be updated after pressing
\ll
once, and Skim should display the updated fileActual behavior
First
\ll
doesn't compile, second\ll
says it compiled but the PDF doesn't changeDo you use a latexmkrc file?
I deleted it for this test
VimtexInfo