[Vim-latex-cvs] vimfiles/ftplugin/latex-suite wizardfuncs.vim,1.9,1.10
Brought to you by:
srinathava,
tmaas
From: <mi...@us...> - 2003-04-04 23:25:06
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv29733 Modified Files: wizardfuncs.vim Log Message: comments, fixing bugs for partial compilation, using <Plug> for mapping Index: wizardfuncs.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/wizardfuncs.vim,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** wizardfuncs.vim 4 Apr 2003 00:55:46 -0000 1.9 --- wizardfuncs.vim 4 Apr 2003 23:25:03 -0000 1.10 *************** *** 206,210 **** inoremap <buffer> <silent> <F1> <C-O>:silent! call <SID>TexHelp()<CR> nnoremap <buffer> <silent> <F1> :silent! call <SID>TexHelp()<CR> ! command! -nargs=0 THelp silent! call <SID>TexHelp()<CR> " TexHelp: Cursor being on LaTeX item check if exists help tag about it " {{{ --- 206,210 ---- inoremap <buffer> <silent> <F1> <C-O>:silent! call <SID>TexHelp()<CR> nnoremap <buffer> <silent> <F1> :silent! call <SID>TexHelp()<CR> ! command! -nargs=0 THelp silent! call <SID>TexHelp() " TexHelp: Cursor being on LaTeX item check if exists help tag about it " {{{ *************** *** 225,241 **** " ============================================================================== ! " Partial compilation " ============================================================================== ! map <F10> :call Tex_PartCompilation()<cr> ! " Tex_PartCompilation: compilation of selected fragment ! function! Tex_PartCompilation() range ! let mainfile = Tex_GetMainFileName() let g:partcomp = 1 let tmpfile = tempname() let g:tfile = tmpfile if mainfile != '' exe 'bot 1 split '.mainfile --- 225,258 ---- " ============================================================================== ! " Partial compilation and viewing output " ============================================================================== ! " ! nnoremap <silent> <Plug>Tex_PartCompilation :call Tex_PartCompilation("f","l","v")<CR> ! if !hasmapto('<Plug>Tex_PartCompilation',"v") ! nnoremap <buffer> <silent> <F10> <Plug>Tex_PartCompilation ! endif ! map <F10> :call Tex_PartCompilation("f","l", "v")<cr> ! command! -nargs=0 -range TPartComp silent! call Tex_PartCompilation(<line1>,<line2>, "c") ! command! -nargs=0 TPartView silent! call ViewLaTeX("part") ! ! " Tex_PartCompilation: compilation of selected fragment {{{ ! function! Tex_PartCompilation(fline,lline,mode) range ! ! " Set partial compilation flag let g:partcomp = 1 + " Save position + let pos = line('.').' | normal! '.virtcol('.').'|' + " Create temporary file and save its name into global variable to use in + " compiler.vim let tmpfile = tempname() let g:tfile = tmpfile + "Create temporary file + " If mainfile exists open it in tiny window and extract preamble there, + " otherwise do it from current file + let mainfile = Tex_GetMainFileName() if mainfile != '' exe 'bot 1 split '.mainfile *************** *** 245,252 **** exe '1,/\s*\\begin{document}/w '.tmpfile endif ! ! let pos = line('.').' | normal! '.virtcol('.').'|' ! ! exe a:firstline.','.a:lastline."w >> ".tmpfile let _clipboard = @c let @c = '\end{document}' --- 262,272 ---- exe '1,/\s*\\begin{document}/w '.tmpfile endif ! " Write range to file, check how it works with marks, range and //,// ! if a:mode == 'v' ! exe a:firstline.','.a:lastline."w! >> ".tmpfile ! else ! exe a:fline.','.a:lline."w! >> ".tmpfile ! endif ! " Add \end{document} to temporary file. Is it really the only way? let _clipboard = @c let @c = '\end{document}' *************** *** 256,261 **** let @c = _clipboard - exe pos silent! call RunLaTeX() unlet g:partcomp --- 276,283 ---- let @c = _clipboard silent! call RunLaTeX() + + " Unlet partial compilation flag for not interfering with normal + " compilation. Maybe argument for RunLaTeX() is better? unlet g:partcomp |