From bd9cf05d9a2765b731ef579dadd3e1fdf7ecca89 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Tue, 15 Jun 2021 15:12:06 +0200 Subject: Setup forward synctex for vim+zathura --- vim/.vim/after/ftplugin/tex.vim | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'vim/.vim/after/ftplugin/tex.vim') diff --git a/vim/.vim/after/ftplugin/tex.vim b/vim/.vim/after/ftplugin/tex.vim index aabdc85..de2ec0b 100644 --- a/vim/.vim/after/ftplugin/tex.vim +++ b/vim/.vim/after/ftplugin/tex.vim @@ -1,2 +1,10 @@ setlocal spell spelllang=en_gb setlocal tabstop=2 shiftwidth=2 + +function! Synctex() + call system('zathura --synctex-forward ' . + \ line('.') . ':' . col('.') . ':' . shellescape(bufname('%')) . ' ' . + \ shellescape(g:synctex_zathura_pdf_filename)) +endfunction + +map <C-T> :call Synctex()<CR> -- cgit v1.2.3