diff options
author | Camil Staps | 2021-06-15 15:12:06 +0200 |
---|---|---|
committer | Camil Staps | 2021-06-15 15:12:06 +0200 |
commit | bd9cf05d9a2765b731ef579dadd3e1fdf7ecca89 (patch) | |
tree | 678ddaac1fc9ad593d7b1425066312b8b4d82111 /vim/.vim/after/ftplugin/tex.vim | |
parent | Fix synctex setup in .latexmkrc for neovim, which does not have --servername (diff) |
Setup forward synctex for vim+zathura
Diffstat (limited to 'vim/.vim/after/ftplugin/tex.vim')
-rw-r--r-- | vim/.vim/after/ftplugin/tex.vim | 8 |
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> |