Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32441
Modified Files:
compiler.vim main.vim texrc
Log Message:
New: A new setting Tex_ShowErrorContext which if set to 0, will not show
the preview window beneath the list of errors.
Index: compiler.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/compiler.vim,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -d -r1.70 -r1.71
*** compiler.vim 18 Jun 2004 23:13:22 -0000 1.70
--- compiler.vim 18 Jun 2004 23:59:48 -0000 1.71
***************
*** 135,174 ****
call Tex_CD(curd)
endfunction " }}}
- " Tex_SetupErrorWindow: sets up the cwindow and preview of the .log file {{{
- " Description:
- function! Tex_SetupErrorWindow()
- let mainfname = Tex_GetMainFileName()
-
- let winnum = winnr()
-
- " close the quickfix window before trying to open it again, otherwise
- " whether or not we end up in the quickfix window after the :cwindow
- " command is not fixed.
- cclose
- cwindow
- " create log file name from mainfname
- let mfnlog = fnamemodify(mainfname, ":t:r").'.log'
- call Tex_Debug('Tex_SetupErrorWindow: mfnlog = '.mfnlog, 'comp')
- " if we moved to a different window, then it means we had some errors.
- if winnum != winnr()
- call Tex_UpdatePreviewWindow(mfnlog)
- exe 'nnoremap <buffer> <silent> j j:call Tex_UpdatePreviewWindow("'.mfnlog.'")<CR>'
- exe 'nnoremap <buffer> <silent> k k:call Tex_UpdatePreviewWindow("'.mfnlog.'")<CR>'
- exe 'nnoremap <buffer> <silent> <up> <up>:call Tex_UpdatePreviewWindow("'.mfnlog.'")<CR>'
- exe 'nnoremap <buffer> <silent> <down> <down>:call Tex_UpdatePreviewWindow("'.mfnlog.'")<CR>'
- exe 'nnoremap <buffer> <silent> <enter> :call Tex_GotoErrorLocation("'.mfnlog.'")<CR>'
-
- setlocal nowrap
-
- " resize the window to just fit in with the number of lines.
- exec ( line('$') < 4 ? line('$') : 4 ).' wincmd _'
- if Tex_GetVarValue('Tex_GotoError') == 1
- call Tex_GotoErrorLocation(mfnlog)
- else
- exec s:origwinnum.' wincmd w'
- endif
- endif
-
- endfunction " }}}
" Tex_RunLaTeX: compilation function {{{
" this function runs the latex command on the currently open file. often times
--- 135,138 ----
***************
*** 595,598 ****
--- 559,600 ----
" window.
" ==============================================================================
+ " Tex_SetupErrorWindow: sets up the cwindow and preview of the .log file {{{
+ " Description:
+ function! Tex_SetupErrorWindow()
+ let mainfname = Tex_GetMainFileName()
+
+ let winnum = winnr()
+
+ " close the quickfix window before trying to open it again, otherwise
+ " whether or not we end up in the quickfix window after the :cwindow
+ " command is not fixed.
+ cclose
+ cwindow
+ " create log file name from mainfname
+ let mfnlog = fnamemodify(mainfname, ":t:r").'.log'
+ call Tex_Debug('Tex_SetupErrorWindow: mfnlog = '.mfnlog, 'comp')
+ " if we moved to a different window, then it means we had some errors.
+ if winnum != winnr()
+ if Tex_GetVarValue('Tex_ShowErrorContext')
+ call Tex_UpdatePreviewWindow(mfnlog)
+ exe 'nnoremap <buffer> <silent> j j:call Tex_UpdatePreviewWindow("'.mfnlog.'")<CR>'
+ exe 'nnoremap <buffer> <silent> k k:call Tex_UpdatePreviewWindow("'.mfnlog.'")<CR>'
+ exe 'nnoremap <buffer> <silent> <up> <up>:call Tex_UpdatePreviewWindow("'.mfnlog.'")<CR>'
+ exe 'nnoremap <buffer> <silent> <down> <down>:call Tex_UpdatePreviewWindow("'.mfnlog.'")<CR>'
+ endif
+ exe 'nnoremap <buffer> <silent> <enter> :call Tex_GotoErrorLocation("'.mfnlog.'")<CR>'
+
+ setlocal nowrap
+
+ " resize the window to just fit in with the number of lines.
+ exec ( line('$') < 4 ? line('$') : 4 ).' wincmd _'
+ if Tex_GetVarValue('Tex_GotoError') == 1
+ call Tex_GotoErrorLocation(mfnlog)
+ else
+ exec s:origwinnum.' wincmd w'
+ endif
+ endif
+
+ endfunction " }}}
" Tex_PositionPreviewWindow: positions the preview window correctly. {{{
" Description:
***************
*** 760,763 ****
--- 762,768 ----
exec 'silent! '.linenum.' | normal! '.normcmd
+ if !Tex_GetVarValue('Tex_ShowErrorContext')
+ pclose!
+ endif
endfunction " }}}
" Tex_SetCompilerMaps: sets maps for compiling/viewing/searching {{{
Index: main.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -d -r1.70 -r1.71
*** main.vim 18 Jun 2004 23:13:22 -0000 1.70
--- main.vim 18 Jun 2004 23:59:48 -0000 1.71
***************
*** 606,610 ****
" keep that as a stable point.
function! Tex_Version()
! return "Latex-Suite: version 1.6.05"
endfunction
--- 606,610 ----
" keep that as a stable point.
function! Tex_Version()
! return "Latex-Suite: version 1.6.06"
endfunction
Index: texrc
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/texrc,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** texrc 18 Jun 2004 23:13:23 -0000 1.46
--- texrc 18 Jun 2004 23:59:48 -0000 1.47
***************
*** 241,244 ****
--- 241,248 ----
TexLet g:Tex_GotoError = 1
+ " If set to 1, then latex-suite shows the context of the error in a preview
+ " window beneath the window showing the actual errors.
+ TexLet g:Tex_ShowErrorContext = 1
+
" Remove temp files created during part compilations when vim exits.
TexLet g:Tex_RemoveTempFiles = 1
|