Closed 5nizza closed 9 years ago
Just tried setting let g:LatexBox_viewer = "okular"
in my .vimrc and then calling :LatexView
in a .tex file worked fine here (Linux).
well, 1) it opens okular
, but each call of \lv
pops a new window, and 2) it does not scroll to the place of the vim cursor.
but thanks! it is better than nothing!)
I have the same behaviour here, but actually never noticed it because okular re-reads the pdf as soon as it is changed. So there was no need to call :LatexView
more than once.
This thread is a bit old, but I'll post an answer in case anyone else reads this.
It is possible to use let g:LatexBox_viewer = "okular --unique"
to ensure that new windows are not created.
To move to a specific position in the file you can put the following code in your vimrc
function! SyncTexForward()
let s:syncfile = LatexBox_GetOutputFile()
let execstr = "silent !okular --unique ".s:syncfile."\\#src:".line(".").expand("%\:p").' &'
exec execstr
endfunction
nnoremap <Localleader>ls :call SyncTexForward()<CR>
The above code is courtesy of https://www.reddit.com/r/vimplugins/comments/32t0xc/forward_search_with_latexbox/
Haven't found this in docs: Is it possible to preview pdf using okular rather than in evince?
(this is not an issue nor a feature request -- just a question).