[Vim-latex-cvs] vimfiles/ftplugin/latex-suite main.vim,1.17,1.17.2.1
Brought to you by:
srinathava,
tmaas
From: <sri...@us...> - 2002-12-27 20:53:38
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv1524 Modified Files: Tag: b-newpackages main.vim Log Message: . Tex_GetMainFileName now uses an optional argument. If this argument is supplied, then it uses this to modify the mainfilename (instead of ':p:r:r'). The default returns 'thesis' if the main file is named 'thesis.tex.latexmain', i.e the .tex extension is lost. Sometimes, we might actually want the extension. Index: main.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v retrieving revision 1.17 retrieving revision 1.17.2.1 diff -C2 -d -r1.17 -r1.17.2.1 *** main.vim 22 Dec 2002 03:00:44 -0000 1.17 --- main.vim 27 Dec 2002 20:53:34 -0000 1.17.2.1 *************** *** 4,8 **** " Email: sr...@fa... " URL: ! " Last Change: Thu Dec 19 03:00 AM 2002 PST " " Help: --- 4,8 ---- " Email: sr...@fa... " URL: ! " Last Change: Tue Dec 24 02:00 AM 2002 PST " " Help: *************** *** 374,383 **** " i.e if main.tex.latexmain exists, then returns: " d:/path/to/main ! function! Tex_GetMainFileName() let curd = getcwd() exe 'cd '.expand('%:p:h') let lheadfile = glob('*.latexmain') if lheadfile != '' ! let lheadfile = fnamemodify(lheadfile, ':p:r:r') endif exe 'cd '.curd --- 374,388 ---- " i.e if main.tex.latexmain exists, then returns: " d:/path/to/main ! function! Tex_GetMainFileName(...) ! if a:0 > 0 ! let modifier = a:1 ! else ! let modifier = ':p:r:r' ! endif let curd = getcwd() exe 'cd '.expand('%:p:h') let lheadfile = glob('*.latexmain') if lheadfile != '' ! let lheadfile = fnamemodify(lheadfile, modifier) endif exe 'cd '.curd *************** *** 429,432 **** --- 434,464 ---- let s:incnum = a:val endfunction " }}} + " Functions for debugging {{{ + " Tex_Debug: appends the argument into s:debugString {{{ + " 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 " }}} + " Tex_ClearDebug: clears the s:debugString string {{{ + " Description: + " + function! Tex_ClearDebug() + if exists('s:debugString') + let s:debugString = '' + endif + endfunction " }}} + " }}} " source all the relevant files. |