[Vim-latex-cvs] vimfiles/ftplugin/latex-suite main.vim,1.22,1.23
Brought to you by:
srinathava,
tmaas
From: <sri...@us...> - 2003-01-04 00:49:57
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv1268 Modified Files: main.vim Log Message: Made the debugging statements more advanced. Each file can now call Tex_Debug as call Tex_Debug('something', 'modulename') Afterwards, we can do: call Tex_PrintDebug('modulename') This way debugging statements from various modules will not interfere with each other. These functions might seem like bloat, but the reason I am making them is that in the future when latex-suite becomes even bigger, it might be painful to find out why a user is facing problems. In such cases, we might want to tell the user to do something like, "Set g:Tex_Debug = 1, do `lv and then please tell us what g:Tex_PrintDebug('compiler') says" (if for instance the user has some compilation/viewing problems). Index: main.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** main.vim 27 Dec 2002 22:55:44 -0000 1.22 --- main.vim 4 Jan 2003 00:49:53 -0000 1.23 *************** *** 4,8 **** " Email: sr...@fa... " URL: ! " Last Change: Fri Dec 27 02:00 PM 2002 PST " " Help: --- 4,8 ---- " Email: sr...@fa... " URL: ! " Last Change: Fri Jan 03 04:00 PM 2003 PST " " Help: *************** *** 422,437 **** " Description: " ! function! Tex_Debug(str) ! if !exists('s:debugString') ! let s:debugString = '' endif ! let s:debugString = s:debugString.a:str."\n" endfunction " }}} " Tex_PrintDebug: prings s:debugString {{{ " Description: " ! function! Tex_PrintDebug() ! if exists('s:debugString') ! echo s:debugString endif endfunction " }}} --- 422,455 ---- " Description: " ! " Do not want a memory leak! Set this to zero so that latex-suite always ! " starts out in a non-debugging mode. ! if !exists('g:Tex_Debug') ! let g:Tex_Debug = 0 ! endif ! function! Tex_Debug(str, ...) ! if !g:Tex_Debug ! return endif ! if a:0 > 0 ! let pattern = a:1 ! else ! let pattern = '' ! endif ! if !exists('s:debugString_'.pattern) ! let s:debugString_{pattern} = '' ! endif ! let s:debugString_{pattern} = s:debugString_{pattern}.a:str."\n" endfunction " }}} " Tex_PrintDebug: prings s:debugString {{{ " Description: " ! function! Tex_PrintDebug(...) ! if a:0 > 0 ! let pattern = a:1 ! else ! let pattern = '' ! endif ! if exists('s:debugString_'.pattern) ! echo s:debugString_{a:pattern} endif endfunction " }}} *************** *** 439,445 **** " Description: " ! function! Tex_ClearDebug() ! if exists('s:debugString') ! let s:debugString = '' endif endfunction " }}} --- 457,468 ---- " Description: " ! function! Tex_ClearDebug(...) ! if a:0 > 0 ! let pattern = a:1 ! else ! let pattern = '' ! endif ! if exists('s:debugString_'.pattern) ! let s:debugString_{pattern} = '' endif endfunction " }}} |