From fb2d07c790c34f66e9440162e49001ad2ffdd0e7 Mon Sep 17 00:00:00 2001 From: Jongwook Choi Date: Tue, 3 Oct 2023 11:25:29 -0400 Subject: [PATCH] fix: Don't do timeout in pvc mode after inactivity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By default the `-pvc` mode will stop working after 30 mins of inactivity, where vimtex compiler and the latexmk process can fall into an inconsistent state (i.e., no longer able to build the latex project while vimtex still thinks the continuous mode is still running). To prevent this, we disable inactivity timeout in the pvc mode. Requires latexmk v4.55 (Jan 2018) or higher. From https://texdoc.org/serve/latexmk/0 ``` -pvctimeout Do timeout in pvc mode after period of inactivity, which is 30 min. by default. Inactivity means a period when latexmk has detected no file changes and hence has not taken any actions like compiling the document. -pvctimeout- Don’t do timeout in pvc mode after inactivity. ``` --- autoload/vimtex/compiler/latexmk.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/vimtex/compiler/latexmk.vim b/autoload/vimtex/compiler/latexmk.vim index e3e012faaa..186cc2e9f9 100644 --- a/autoload/vimtex/compiler/latexmk.vim +++ b/autoload/vimtex/compiler/latexmk.vim @@ -141,7 +141,7 @@ function! s:compiler.__build_cmd() abort dict " {{{1 endif if self.continuous - let l:cmd .= ' -pvc -view=none' + let l:cmd .= ' -pvc -pvctimeout- -view=none' if self.callback for [l:opt, l:val] in [ @@ -164,7 +164,7 @@ function! s:compiler.__pprint_append() abort dict " {{{1 if !empty(self.aux_dir) call add(l:list, ['aux_dir', self.aux_dir]) endif - + call add(l:list, ['callback', self.callback]) call add(l:list, ['continuous', self.continuous]) call add(l:list, ['executable', self.executable])