-
Notifications
You must be signed in to change notification settings - Fork 389
-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let g:vimtex_view_method = 'zathura' , but cannot open zathura after compilation. #2630
Comments
You need to define VimTeX options earlier than during filetype plugin loading. I.e., put it in your |
@lervag Now I encountered another problem with inverse search by using Zathura. It seems like the inverse search should work according to #2219 and #2281. Thanks for your time in advance! |
Can you explain what you are trying when you are trying to do inverse search? |
Well, I first use \v to open a Zathura pdf viewer to check the compiled contents. But when I try to use double-click or ctrl+click to jump into the line of relevant codes in another section. |
From the screenshots and report, it seems you have things properly set up. Perhaps you used the wrong sequence to invoke inverse search? Inverse search with Zathura is triggered with CTRL + clik (left mouse button) somewhere in the PDF document. |
Yes, I use CTRL + click (left mouse button), but it still didn't work. I'm wondering if there is any way I can debug the whole process? |
Strange. Let's start by simplifying everything. Can you try this:
What happens now?
set nocompatible
set runtimepath^=~/.local/plugged/vimtex
set runtimepath+=~/.local/plugged/vimtex/after
filetype plugin indent on
syntax enable
let g:vimtex_view_method = 'zathura'
\documentclass{minimal}
\begin{document}
Hello World
Hello Moon
\end{document} |
I would be surprised if things work now, so I'll just hint on the next step, which is to open Zathura from a terminal with the same command as VimTeX uses (you find it with |
I have changed a little about the runtimepath variable, because I use the packer to install the Vimtex: set nocompatible
set runtimepath^=~/.local/share/lunarvim/site/pack/packer/start/vimtex
set runtimepath+=~/.local/share/lunarvim/site/pack/packer/start/vimtex/after
filetype plugin indent on
syntax enable
let g:vimtex_view_method = 'zathura'
I can compile the tex file and view the compiled content. My cursor is on the first row, i.e. Hello World. I also tried to run the same command as VimTeX uses (in |
Update: I tried the same command in |
Ah, yes, good. I should have mentioned that.
Just to be clear: you are doing
Yes, but that is forward search and is irrelevant to the problem you are describing. What you want to do is this:
|
Yes, I'm doing I first compile the document by using \ll and quit, then I run
Zathura now is open and view the test.pdf file. When I do |
Ok; next step.
Additionally, could you give me some more info:
|
Well, when I use Now I'm aware that I don't install Vimtex in neovim since I've been using lunarvim all the time. BTW, I have not noticed the subtle relationship between lunarvim and neovim, thus costs several hours to debug. After installing the Vimtex in the original neovim, now I can inverse search successfully! |
Ok; this implies that VimTeX was not installed properly. A lot of people force lazy loading of plugins, and that may be the problem here. Perhaps LunarVim lazily loads VimTeX. That would explain the problem. VimTeX is already lazily loaded by the builtin mechanisms in Vim, but VimTeX needs to create the
And this is why I tend to suggest that people use their own configurations and that they avoid too many plugins. Still, I think projects like LunarVim should often be safe, so I'm surprised this was an issue! I'll check and possibly report upstream.
Glad to hear it! Enjoy :) |
Ok, I didn't see any errors on the LunarVim project in this regard, so I think the error must have been on your side. I believe you may have installed VimTeX lazily without knowing that it is not good. :) |
Yes, I'm new to vim and lua configuration. :) It becomes complex when there are too many plugins and configurations, especially when some minor configurations really matter. Anyway, thanks for your patience and help again! |
No problem; glad to help. |
Description
I set
g:vimtex_view_method = 'zathura'
inftplugin/tex/tex.vim
. In neovim I execute:echo g:vimtex_view_method
, it outputs "zathura". But when I query theVimtexInfo
, the value of viewer is still "General". The neovim cannot open the zathura when finishing compilation as well as use shortcut\lv
.But I can use
zathura main.pdf
to open the pdf file.ldd $(which zathura) | grep libsynctex
also shows the linked.so
file.Steps to reproduce
No response
Expected behavior
No response
Actual behavior
No response
Do you use a latexmkrc file?
No
VimtexInfo
The text was updated successfully, but these errors were encountered: