Closed 777uliahshafar closed 11 months ago
See comment by @lervag in #117 (comment)
You first opened the issue by copying my comment, then later added the description. I've moved your issue description to your original post, removed the copy of my comment and instead just left the reference. However, it is VERY unclear what the point of that reference is - could you explain?
I am using Windows 11, neovim and SumatraPDF. After continuous compilation, the SumatraPDF can't set the page for the new added line.
Does regular forward search work? I.e., if you do \lv
, does it make SumatraPDF move to the current line?
Sorry, my bad, Mr. Lervag, I am always in rush when I faced the issue, :D. Alright, I referenced your comment in that issue for acknowledging what is supposed to happen after continuous compilation. 1. return focus to vim, 2. Set page in viewer to the current page. For the second, I think it means the viewer would forward search. In case of my system, the viewer would not set page where new text was added before I can edited back in my vim. Though, the viewer was still updated without clear sign.
Does regular forward search work? I.e., if you do \lv, does it make SumatraPDF move to the current line?
The Vimtex-View is works as it supposed to. The SumatraPDF did a great job highlighting the text and focus on its window. I wanted that highlight also happen when I did continuous compilation or at least the page could move then directly move to vim. I am still wonder if that can happen.
Before read your comment on the issue I referenced, I planned to use vimtex event compile to vimtex event view. But I could not find those resource (configuration on the internet). I am happy to explain bit more if my language bit complex. Thank you.
Sorry, my bad, Mr. Lervag,
Ok, no problem :)
I am always in rush when I faced the issue, :D.
Notice, though, that by being "in rush" you are most likely causing both me and you to spend more time communicating before actually getting to a solution. Thus, if you slow down, then you may experience that you actually speed up by avoiding unnecessary "double work". :)
Slow is smooth, smooth is fast!
Before read your comment on the issue I referenced, I planned to use vimtex event compile to vimtex event view. But I could not find those resource (configuration on the internet). I am happy to explain bit more if my language bit complex. Thank you.
I think this may be your best solution here. You can use something like this:
augroup vimtex_events
autocmd!
autocmd User VimtexEventCompileSuccess VimtexView
augroup END
You can place it more or less whereever you want. I would suggest putting it near where you are configuring VimTeX generally.
I am back from refreshers and slow and smooth, The solution by using vimtex event is good Mr. Lervag, However, Just like what I thought the focus is not comeback to the neovim. I'd like to watch the change on viewer (either change the page or using highlight) and still maintain my cursor on neovim. Could this be happen Sir? Thank you very much.
The solution by using vimtex event is good Mr. Lervag, However, Just like what I thought the focus is not comeback to the neovim.
Ah. Ok, that's harder.
I'd like to watch the change on viewer (either change the page or using highlight) and still maintain my cursor on neovim. Could this be happen Sir? Thank you very much.
I'm not sure, to be honest. I assume SumatraPDF will refresh, right, so it does update automatically after compilation. But you want it to also highlight the position of the cursor similar to what happens when you do \lv
, but without it getting focus?
I checked the SumatraPDF manual, and I don't find any related command-line options. I'm not sure if this is possible, and if it is, I don't know how. Sorry!
Thank you Mr. lervag for the responses. I feel very good for my configuration now. I will leave this for further exploration for me. Cheers.
Glad to hear it! :)
Facing exactly the same issue. If I check the actual compiled PDF, the change has been made. But SumatraPDF is not updating the change.
Facing exactly the same issue. If I check the actual compiled PDF, the change has been made. But SumatraPDF is not updating the change.
A temporary work-around is to press r
in SumatraPDF, which manually refresh the PDF file...
Facing exactly the same issue. If I check the actual compiled PDF, the change has been made. But SumatraPDF is not updating the change.
I'm not sure if that is the same issue. Also, as this issue was resolved, it seems better if you open a new issue with a full and detailed description that follows the issue template.
As far as I know, things should work well with VimTeX and SumatraPDF. There have not been any significant changes recently that should have changed anything either. Thus, if you have a problem, I believe it may be caused by some configuration issue or similar. To help, I would have to know more, most of which is asked in the regular issue template.
I am using Windows 11, neovim and SumatraPDF. After continuous compilation, the SumatraPDF can't set the page for the new added line.
See comment by @lervag in https://github.com/lervag/vimtex/issues/117#issuecomment-74546114
Steps to reproduce
minimal.tex
Actual behaviour The PDF viewer (SumatraPDF) still on the same page after continuous compilation success.
Expected behaviour I'd like to SumatraPDf go to the page where I have added new text. but will return focus on neovim.
Do you use a latexmkrc file? No
Vimtex info