- In a script called 'vimura':
#!/bin/sh
echo $1
zathura -s -x "gvim --servername $1 -c \"let g:syncpdf='$1'\" --remote +%{line} %{input}" $*
For zathura >= 0.3.2 remove -s
.
- In your vimrc:
function! Synctex()
" remove 'silent' for debugging
execute "silent !zathura --synctex-forward " . line('.') . ":" . col('.') . ":" . bufname('%') . " " . g:syncpdf
endfunction
map <C-enter> :call Synctex()<cr>
- Build your latex doc with synctex enabled
pdflatex -synctex=1 ...
-
Open PDF with vimura script.
-
CTRL+Click
in Zathura jumps to source in vim. -
CTRL+Enter
in vim jumps to corresponding position in PDF.
Hello there
Support for synctex with vim or gvim and zathura is included in glartex now, a command-line utility to start a latex session.
www.github.com/de-arl/glartex