From ef194e82a6ec91abab1682ea4643c21d894313c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Sun, 13 Jul 2014 00:27:43 +0200 Subject: [PATCH] Allow arguments for latex#view (fixes #23) --- autoload/latex.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/autoload/latex.vim b/autoload/latex.vim index 374ce9c..d94e4ad 100644 --- a/autoload/latex.vim +++ b/autoload/latex.vim @@ -87,15 +87,19 @@ function! latex#reinit() endfunction " {{{1 latex#view -function! latex#view() +function! latex#view(...) let outfile = g:latex#data[b:latex.id].out() if !filereadable(outfile) echomsg "Can't view: Output file is not readable!" return endif + " Join arguments to pass them on to the viewer + let args = join(a:000, ' ') + let exe = {} - let exe.cmd = g:latex_viewer . ' ' . shellescape(outfile) + let exe.cmd = g:latex_viewer . ' ' . args . shellescape(outfile) + call latex#util#execute(exe) endfunction " }}}1