aboutsummaryrefslogtreecommitdiff
path: root/vim/.vim/after
diff options
context:
space:
mode:
authorCamil Staps2021-06-15 15:12:06 +0200
committerCamil Staps2021-06-15 15:12:06 +0200
commitbd9cf05d9a2765b731ef579dadd3e1fdf7ecca89 (patch)
tree678ddaac1fc9ad593d7b1425066312b8b4d82111 /vim/.vim/after
parentFix synctex setup in .latexmkrc for neovim, which does not have --servername (diff)
Setup forward synctex for vim+zathura
Diffstat (limited to 'vim/.vim/after')
-rw-r--r--vim/.vim/after/ftplugin/tex.vim8
1 files changed, 8 insertions, 0 deletions
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>