Re: [Vim-latex-devel] View document in another directory
Brought to you by:
srinathava,
tmaas
From: Srinath A. <sr...@fa...> - 2004-06-18 23:55:46
|
On Sat, 19 Jun 2004, Luc Hermitte wrote: > * On Fri, Jun 18, 2004 at 03:38:16PM -0700, Srinath Avadhanula <sr...@fa...> wrote: > > This way you could have set Tex_ViewRule_html to something like > > :let Tex_ViewRule_html = '!start cygstart html/$*.html' > > and have things work OOTB. > > That's neat. But a bit problematic. > While this works perfectly with cygstart (because this program forks), > it can not be used with start (execution error) which would be required > with programs that do not fork like AcroRd32 -- I've just made some > experiments. Actually you can make it work with !start too. Here's a little demo: Open vim (not necessarily with latex-suite activated) and do: let &mp = 'start gvim $*' silent! make! % you will need gvim.exe to be in your windows $PATH of course. You should see another instance of gvim startup and attempt to reread the file.... The silent! is necessary because vim tries to redirect the output of "!start gvim file" to some temp file and then parse it for errors. Without the "silent!" it gives an error that the temp file cannot be opened. I got carried away and have already implemented this in CVS. > It seems we will need our own make-like command. Its only work beeing to > substitute $* by the name of the result of the compilation. > In the long run, it can even be extended to support custom formats like > %pwd, %line, %col, ... > As of right now, I have made it substitute the substring '{v:servername}' in &mp with v:servername. We could extend it to something like: :function! Eval(expr) : exec 'return '.a:expr :endfunction :let mp = substitute(&mp, '{\(.\{-}\)}', '\=Eval(submatch(1))', 'g') > > > > [Request: option for the preview window] > > This should also be an easy thing to modify. I'll put it on the TODO. > This is also done in CVS. Should be uploading shortly. Srinath |