Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv12421
Modified Files:
main.vim compiler.vim
Log Message:
merging from the latex-multi-compile branch.
Index: main.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** main.vim 26 Jul 2003 19:15:55 -0000 1.45
--- main.vim 29 Aug 2003 02:29:35 -0000 1.46
***************
*** 595,598 ****
--- 595,599 ----
endif
+ exe 'source '.s:path.'/multicompile.vim'
exe 'source '.s:path.'/compiler.vim'
exe 'source '.s:path.'/folding.vim'
Index: compiler.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/compiler.vim,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** compiler.vim 25 Jul 2003 01:13:21 -0000 1.42
--- compiler.vim 29 Aug 2003 02:29:35 -0000 1.43
***************
*** 40,44 ****
\'No '.a:type.' rule defined for target '.target."\n".
\'Please specify a rule in texrc.vim'."\n".
! \' :help latex-compiler-target'."\n".
\'for more information',
\"&ok", 1, 'Warning')
--- 40,44 ----
\'No '.a:type.' rule defined for target '.target."\n".
\'Please specify a rule in texrc.vim'."\n".
! \' :help Tex_CompileRule_format'."\n".
\'for more information',
\"&ok", 1, 'Warning')
***************
*** 47,51 ****
\'No '.a:type.' rule defined for target '.target."\n".
\'Please specify a rule in texrc.vim'."\n".
! \' :help latex-compiler-target'."\n".
\'for more information'
\)
--- 47,51 ----
\'No '.a:type.' rule defined for target '.target."\n".
\'Please specify a rule in texrc.vim'."\n".
! \' :help Tex_ViewRule_format'."\n".
\'for more information'
\)
***************
*** 85,108 ****
" }}}
! " RunLaTeX: compilation function {{{
! " this function runs the latex command on the currently open file. often times
! " the file being currently edited is only a fragment being \input'ed into some
! " master tex file. in this case, make a file called mainfile.latexmain in the
! " directory containig the file. in other words, if the current file is
! " ~/thesis/chapter.tex
! " so that doing "latex chapter.tex" doesnt make sense, then make a file called
! " main.tex.latexmain
! " in the ~/thesis directory. this will then run "latex main.tex" when
! " RunLaTeX() is called.
! function! RunLaTeX()
!
! call Tex_Debug('getting to RunLaTeX, b:fragmentFile = '.exists('b:fragmentFile'))
if &ft != 'tex'
echo "calling RunLaTeX from a non-tex file"
return
end
- let dir = expand("%:p:h").'/'
- let curd = getcwd()
- exec 'cd '.expand("%:p:h")
" close any preview windows left open.
--- 85,95 ----
" }}}
! " Tex_CompileLatex: compiles the present file. {{{
! " Description:
! function! Tex_CompileLatex()
if &ft != 'tex'
echo "calling RunLaTeX from a non-tex file"
return
end
" close any preview windows left open.
***************
*** 146,149 ****
--- 133,144 ----
endif
redraw!
+ endfunction " }}}
+ " Tex_SetupErrorWindow: sets up the cwindow and preview of the .log file {{{
+ " Description:
+ function! Tex_SetupErrorWindow()
+ let mainfname = Tex_GetMainFileName(':r')
+ if exists('b:fragmentFile') || mainfname == ''
+ let mainfname = expand('%:t')
+ endif
let winnum = winnr()
***************
*** 173,176 ****
--- 168,219 ----
endif
+ endfunction " }}}
+ " RunLaTeX: compilation function {{{
+ " this function runs the latex command on the currently open file. often times
+ " the file being currently edited is only a fragment being \input'ed into some
+ " master tex file. in this case, make a file called mainfile.latexmain in the
+ " directory containig the file. in other words, if the current file is
+ " ~/thesis/chapter.tex
+ " so that doing "latex chapter.tex" doesnt make sense, then make a file called
+ " main.tex.latexmain
+ " in the ~/thesis directory. this will then run "latex main.tex" when
+ " RunLaTeX() is called.
+ function! RunLaTeX()
+ call Tex_Debug('getting to RunLaTeX, b:fragmentFile = '.exists('b:fragmentFile'), 'comp')
+
+ let dir = expand("%:p:h").'/'
+ let curd = getcwd()
+ exec 'cd '.expand("%:p:h")
+
+ " first get the dependency chain of this format.
+ let dependency = s:target
+ if exists('g:Tex_FormatDependency_'.s:target)
+ if g:Tex_FormatDependency_{s:target} !~ ','.s:target.'$'
+ let dependency = g:Tex_FormatDependency_{s:target}.','.s:target
+ else
+ let dependency = g:Tex_FormatDependency_{s:target}
+ endif
+ endif
+
+ call Tex_Debug('getting dependency chain = ['.dependency.']', 'comp')
+
+ " now compile to the final target format via each dependency.
+ let i = 1
+ while Tex_Strntok(dependency, ',', i) != ''
+ let s:target = Tex_Strntok(dependency, ',', i)
+ call SetTeXCompilerTarget('Compile', s:target)
+ call Tex_Debug('setting target to '.s:target, 'comp')
+
+ if g:Tex_MultipleCompileFormats =~ '\<'.s:target.'\>'
+ call Tex_CompileMultipleTimes()
+ else
+ call Tex_CompileLatex()
+ endif
+
+ let i = i + 1
+ endwhile
+
+ call Tex_SetupErrorWindow()
+
exec 'cd '.curd
endfunction
***************
*** 243,247 ****
" }}}
! " ForwardSearchLaTeX: searches for current location in dvi file. {{{
" Description: if the DVI viewr is compatible, then take the viewer to that
" position in the dvi file. see docs for RunLaTeX() to set a
--- 286,290 ----
" }}}
! " Tex_ForwardSearchLaTeX: searches for current location in dvi file. {{{
" Description: if the DVI viewr is compatible, then take the viewer to that
" position in the dvi file. see docs for RunLaTeX() to set a
***************
*** 254,258 ****
" For inverse search, if you are reading this, then just pressing \ls
" will work.
! function! ForwardSearchLaTeX()
if &ft != 'tex'
echo "calling ViewLaTeX from a non-tex file"
--- 297,301 ----
" For inverse search, if you are reading this, then just pressing \ls
" will work.
! function! Tex_ForwardSearchLaTeX()
if &ft != 'tex'
echo "calling ViewLaTeX from a non-tex file"
***************
*** 525,534 ****
vnoremap <buffer> <Leader>ll :call Tex_PartCompile()<cr>
nnoremap <buffer> <Leader>lv :silent! call ViewLaTeX()<cr>
! nnoremap <buffer> <Leader>ls :silent! call ForwardSearchLaTeX()<cr>
else
nnoremap <buffer> <Leader>ll :call RunLaTeX()<cr>
vnoremap <buffer> <Leader>ll :call Tex_PartCompile()<cr>
nnoremap <buffer> <Leader>lv :call ViewLaTeX()<cr>
! nnoremap <buffer> <Leader>ls :call ForwardSearchLaTeX()<cr>
end
end
--- 568,577 ----
vnoremap <buffer> <Leader>ll :call Tex_PartCompile()<cr>
nnoremap <buffer> <Leader>lv :silent! call ViewLaTeX()<cr>
! nnoremap <buffer> <Leader>ls :silent! call Tex_ForwardSearchLaTeX()<cr>
else
nnoremap <buffer> <Leader>ll :call RunLaTeX()<cr>
vnoremap <buffer> <Leader>ll :call Tex_PartCompile()<cr>
nnoremap <buffer> <Leader>lv :call ViewLaTeX()<cr>
! nnoremap <buffer> <Leader>ls :call Tex_ForwardSearchLaTeX()<cr>
end
end
|