blob: 6de2aea36bdcad7b1cae7fd6c39d962986bdef46 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
setlocal spell spelllang=en_gb
setlocal tabstop=2 shiftwidth=2
function! SyncTeXToPDF()
call system('zathura --synctex-forward ' .
\ line('.') . ':' . col('.') . ':' . shellescape(bufname('%')) . ' ' .
\ shellescape(g:synctex_zathura_pdf_filename))
endfunction
function! g:SyncPDFToTeX(input, line)
" Focus the window vim is running in.
exe "silent !i3-msg '[id=\"" . environ()['WINDOWID'] . "\"] focus'"
" Open the file name and jump to the right line.
" Mysteriously, we need `cd .` to fix the file name in the tabline.
" Putting this in one `exe` seems to reduce flickering.
exe 'tab drop ' . a:input . ' | silent ' . a:line . ' | silent cd .'
endfunction
map <C-T> :call SyncTeXToPDF()<CR>
|