Added support for qpdfview (fixes #122)
This commit is contained in:
parent
dddc35d759
commit
a9094d40cc
@ -8,6 +8,7 @@ let s:viewers = [
|
|||||||
\ 'general',
|
\ 'general',
|
||||||
\ 'mupdf',
|
\ 'mupdf',
|
||||||
\ 'okular',
|
\ 'okular',
|
||||||
|
\ 'qpdfview',
|
||||||
\ 'sumatrapdf',
|
\ 'sumatrapdf',
|
||||||
\ 'zathura',
|
\ 'zathura',
|
||||||
\ ]
|
\ ]
|
||||||
@ -200,6 +201,25 @@ function! latex#view#okular() "{{{1
|
|||||||
let g:latex#data[b:latex.id].cmds.view = exe.cmd
|
let g:latex#data[b:latex.id].cmds.view = exe.cmd
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" }}}1
|
||||||
|
function! latex#view#qpdfview() "{{{1
|
||||||
|
let outfile = g:latex#data[b:latex.id].out()
|
||||||
|
if !filereadable(outfile)
|
||||||
|
echomsg "Can't view: Output file is not readable!"
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
let exe = {}
|
||||||
|
let exe.cmd = 'qpdfview ' . g:latex_view_qpdfview_options
|
||||||
|
let exe.cmd .= ' --unique ' . latex#util#fnameescape(outfile)
|
||||||
|
let exe.cmd .= '\#src:' . latex#util#fnameescape(expand('%:p'))
|
||||||
|
let exe.cmd .= ':' . line('.')
|
||||||
|
let exe.cmd .= ':' . col('.')
|
||||||
|
|
||||||
|
call latex#util#execute(exe)
|
||||||
|
let g:latex#data[b:latex.id].cmds.view = exe.cmd
|
||||||
|
endfunction
|
||||||
|
|
||||||
" }}}1
|
" }}}1
|
||||||
function! latex#view#sumatrapdf() "{{{1
|
function! latex#view#sumatrapdf() "{{{1
|
||||||
let outfile = g:latex#data[b:latex.id].out()
|
let outfile = g:latex#data[b:latex.id].out()
|
||||||
@ -285,6 +305,13 @@ function! s:init_okular() "{{{1
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
"}}}1
|
||||||
|
function! s:init_qpdfview() "{{{1
|
||||||
|
if !executable('qpdfview')
|
||||||
|
echoerr "qpdfview is not available!"
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
"}}}1
|
"}}}1
|
||||||
function! s:init_sumatrapdf() "{{{1
|
function! s:init_sumatrapdf() "{{{1
|
||||||
if !executable('SumatraPDF')
|
if !executable('SumatraPDF')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user