I am a Latex enthusiast and I have set up my own system for compiling and previewing Latex using vim and zathura because I wanted a very minimal setup, without any plugins such as vimtex and the like. I love both vim and zathura very much as they are lighweight and powerful. However, I got a bit stuck on setting up SyncTex. I read the zathura manpages but there is very little documentation and, on top of that, I don't fully understand it. Searching online I only found solutions for Gvim, which I don't have and would rather avoid as I'm very happy with vim.

Does anyone have any suggestions? Does anyone have a working setup that might suit me? Some documentation would also be very helpful. Thanks in advance.


1 Answer 1


this gist should help you as it helped me.

There's an external script called vimura that calls zathura with the -x option set to open your vim at the right spot. Either you call the script from vim and also pass the line where you're at, or just call it from the command-line and backward-search should open vim.

Sometimes when the compilation had failed and the pdf is not here, vim (on terminal) will write rubbish, even with redraw! in the Synctex() function. So I use nnoremap <leader>dx :redraw!<CR> some time to time. Also, I aliased vim to vim --servername vimd for this purpose.

Can't remember all the details because I set it up some time ago, but it works for me every day ever since. Had some trouble using vimura to open the .pdf before the .tex in vim, so I always open the .tex file first, then shortcut to call Synctex(). Forward and backward search works well.

Here are my dotfiles in which most LaTeX stuffs are in after/ftplugin/tex and plugin/prose_functions.tex, in case you want to take a look.

Hope it works for you without too many trouble :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .