6

When compiling from vim using latex-suite (with the command <leader>ll) I often get the following error:

W11: Warning: File "yourLaTeXfile.log" has changed since editing started See ":help W11" for more info.

How can I configure vim/latex-suite to always set the autoread of the log-files produced by Tex_RunLaTeX()? Would it be sufficient to re-map <leader>ll to Tex_RunLaTeX()! or will that introduce any new cool features?

Fredrik Erlandsson
  • 1,279
  • 1
  • 13
  • 22

1 Answers1

0

How can I configure vim/latex-suite to always set the autoread of the log-files produced by Tex_RunLaTeX()?

Find out which filetype is set for the file:

:setl filetype?

Then set up an autocmd:

:autocmd FileType <the-filetype-here> setlocal autoread

Alternatively, you can also directly define the autocmd on the file pattern :autocmd BufRead *.log ..., or append the :setlocal autoread directly to the <Leader>ll mapping.

Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324
  • My `ll` is mapped like this, `nmap ll ' :update!:call Tex_RunLaTeX()` could it work to modify it like this: `nmap ll ':update!:call Tex_RunLaTeX():setlocal autoread'` as it is the spawned log file that causes the W11 not the current file. – Fredrik Erlandsson Oct 22 '13 at 09:54
  • Yes, you're only missing a trailing ``. Or use `... :call Tex_RunLaTeX()setlocal autoread`. – Ingo Karkat Oct 22 '13 at 09:56
  • No, that does not work. I'm compiling a tex file and the file causing the error is the logfile produced by `Tex_RunLaTeX()`. – Fredrik Erlandsson Oct 22 '13 at 12:06
  • Does `Tex_RunLaTeX()` automatically open the log file? If not, you indeed have to rely on some autocmds, like in my answer. – Ingo Karkat Oct 22 '13 at 12:09
  • Yes, `Tex_RunLaTeX()` opens the log file (named the same as the tex-file with the extension log) – Fredrik Erlandsson Oct 22 '13 at 18:24