Last active
November 9, 2024 10:33
-
-
Save vext01/16df5bd48019d451e078 to your computer and use it in GitHub Desktop.
Revisions
-
vext01 revised this gist
Nov 24, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ ``` #!/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`. -
vext01 revised this gist
Nov 24, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,6 +8,8 @@ echo $1 zathura -s -x "gvim -c \"let g:syncpdf='$1'\" --remote +%{line} %{input}" $* ``` For zathura >= 0.3.2 remove `-s`. * In your vimrc: ``` -
vext01 renamed this gist
Nov 19, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
vext01 created this gist
Nov 19, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ # Vim+Zathura+Synctex * In a script called 'vimura': ``` #!/bin/sh echo $1 zathura -s -x "gvim -c \"let g:syncpdf='$1'\" --remote +%{line} %{input}" $* ``` * 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.