Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv28423
Modified Files:
compiler.vim
Log Message:
- proper handling various compilation situations - partial, makefile (Alan Schmitt)
- mappings of partial compilation
Index: compiler.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/compiler.vim,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** compiler.vim 7 Apr 2003 10:52:11 -0000 1.24
--- compiler.vim 14 Apr 2003 17:14:46 -0000 1.25
***************
*** 91,114 ****
pclose!
! " If a *.latexmain file is found, then use that file to
! " construct a main file.
! if Tex_GetMainFileName() != ''
! let mainfname = Tex_GetMainFileName()
! else
! " otherwise just use this file.
! let mainfname = expand("%:t:r")
! endif
!
! " if a makefile exists, just use the make utility
! if glob('makefile') != '' || glob('Makefile') != ''
! let _makeprg = &l:makeprg
! let &l:makeprg = 'make $*'
! if exists('s:target')
! exec 'make '.s:target
! else
! exec 'make'
! endif
! let &l:makeprg = _makeprg
! elseif exists("g:partcomp")
" Change directory to location of temporary file. In this way output
" files will be in temporary directory (no garbage in real current
--- 91,106 ----
pclose!
! " Logic to choose how to compile:
! " if g:partcomp is set
! " do partial compilation
! " else if there is a makefile and no .latexmain
! " do make
! " else
! " call the latex compiler on
! " the current file if there is not .latexmain
! " .latexmain if there is one
! "
! " if partial compilation is wanted
! if exists("g:partcomp")
" Change directory to location of temporary file. In this way output
" files will be in temporary directory (no garbage in real current
***************
*** 119,125 ****
exec 'make '.g:tfile
exe 'lcd '.curdir
! else
! exec 'make '.mainfname
! endif
let winnum = winnr()
--- 111,137 ----
exec 'make '.g:tfile
exe 'lcd '.curdir
! else
! let mainfname = Tex_GetMainFileName()
! " if a makefile and no *.latexmain exists, just use the make utility
! " this also sets mainfname for the rest of the function
! if (glob('makefile') != '' || glob('Makefile') != '') && mainfname == ''
! let mainfname = expand("%:t:r")
! let _makeprg = &l:makeprg
! let &l:makeprg = 'make $*'
! if exists('s:target')
! exec 'make '.s:target
! else
! exec 'make'
! endif
! let &l:makeprg = _makeprg
! else
! " otherwise, if a *.latexmain file is found, then use that file to
! " construct a main file.
! if mainfname == ''
! let mainfname = expand("%:t:r")
! endif
! exec 'make '.mainfname
! endif
! endif
let winnum = winnr()
***************
*** 456,459 ****
--- 468,472 ----
if has("gui")
nnoremap <buffer> <Leader>ll :silent! call RunLaTeX()<cr>
+ vnoremap <buffer> <Leader>lc :call Tex_PartCompilation("f","l","v")<cr>
nnoremap <buffer> <Leader>lv :silent! call ViewLaTeX("all")<cr>
nnoremap <buffer> <Leader>lp :silent! call ViewLaTeX("part")<cr>
***************
*** 461,464 ****
--- 474,478 ----
else
nnoremap <buffer> <Leader>ll :call RunLaTeX()<cr>
+ vnoremap <buffer> <Leader>lc :call Tex_PartCompilation("f","l","v")<cr>
nnoremap <buffer> <Leader>lv :call ViewLaTeX("all")<cr>
nnoremap <buffer> <Leader>lp :call ViewLaTeX("part")<cr>
|