4

I have a problem that is kind of a first-world problem. I work with vimtex and autosave where the pdf is displayed in skim. When the document is updated (through autosave), the pdf flashes for a second. So, the update is not smooth. Actually, in some documents it is smooth, and I couldn't put my finger on the reason.

Does it work smoothly for you? Do you recommend choosing a different viewer for this purpose? Should I try another update strategy?

What I mean by "not smooth", it goes black for a second (aprox) and then changes. What I mean by smooth is that the screen remains white and text appears changed. I have just one document that gets updated quite smoothly.

This is the configuration :

let g:vimtex_view_method = 'skim'
let g:vimtex_compiler_progname = 'nvr'
let g:vimtex_compiler_latexmk = {
\ 'backend' : 'nvim',
\ 'background' : 1,
\ 'build_dir' : '',
\ 'callback' : 1,
\ 'continuous' : 1,
\ 'executable' : 'latexmk',
\ 'options' : [
\ '-pvc',
\ '-shell-escape',
\ '-verbose',
\ '-file-line-error',
\ '-synctex=1',
\ '-interaction=nonstopmode',
\ ],

Another problem is that skim displays often "failed to load the file", because it is updated while it tries to load it.

  • Define what do you mean by smooth? I think it is acceptable, after saving the tex file, skim do need one or two seconds to refresh its content. – jdhao Feb 09 '20 at 02:15
  • 2
    I don't think this is likely to have anything to do with Vim. This is just how your PDF reader behaves when you change (rewrite) a PDF file it's currently viewing, and I'd be surprised if it behaves any differently if you edit the PDF via some other means. (Your answer also appears to confirm this). Therefore I'm voting to close. –  Feb 11 '20 at 10:11
  • I will just say that I posted it on tex community and they said out of topic, should be vim. I guess we can return it there. – user2679290 Feb 11 '20 at 18:47

1 Answers1

3

First, I updated my skim version, and it might have helped. But, apparently, it gets updated really smooth when you set in Skim: PDF->PDF Display->Single Page, in contrary to PDF->PDF Display->Single Page Continuous, that was the mode earlier.

The "failed to load file" will probably be handled by changing the source code.

  • 1
    Well, apparently the question/answer should be in tex StackExchange after all(I first asked there) – user2679290 Feb 09 '20 at 22:20
  • I saw your flag asking to move this question to the tex SE but if they already rejected the question as off topic I'm not sure it's the best idea to move the question again. Maybe we should move it to SuperUser (because it's about a configuration of skim) but I think just closing it and leaving it here is probably the best solution. Is it fine with you? –  Feb 12 '20 at 09:09
  • 1
    "As stated in the comments, it's rather vi/vim related and there's an SE community for this topic. – Stefan Kottwitz♦ Jan 31 at 16:30" That was the reason for closing it there, so I think to pass this there would still be appropriate, as this is not the case. – user2679290 Feb 12 '20 at 10:59