vim-latex-cvs Mailing List for Vim-Latex (Page 17)
Brought to you by:
srinathava,
tmaas
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(82) |
Dec
(124) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(104) |
Feb
(3) |
Mar
(6) |
Apr
(48) |
May
(34) |
Jun
(62) |
Jul
(33) |
Aug
(24) |
Sep
(32) |
Oct
(16) |
Nov
(36) |
Dec
(39) |
2004 |
Jan
|
Feb
(3) |
Mar
(8) |
Apr
|
May
(29) |
Jun
(13) |
Jul
(4) |
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
(6) |
Dec
(9) |
2006 |
Jan
(9) |
Feb
(2) |
Mar
(16) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(22) |
Jun
(1) |
Jul
|
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(17) |
Sep
(3) |
Oct
(4) |
Nov
(1) |
Dec
(3) |
2010 |
Jan
(25) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(8) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(10) |
Oct
(1) |
Nov
|
Dec
(1) |
2012 |
Jan
(5) |
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(4) |
Nov
(1) |
Dec
|
2013 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(15) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
From: <sri...@us...> - 2003-08-29 02:32:55
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv12915 Added Files: multicompile.vim Log Message: New file from the latex-multi-compile branch. |
From: <sri...@us...> - 2003-08-29 02:29:38
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv12421 Modified Files: main.vim compiler.vim Log Message: merging from the latex-multi-compile branch. Index: main.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** main.vim 26 Jul 2003 19:15:55 -0000 1.45 --- main.vim 29 Aug 2003 02:29:35 -0000 1.46 *************** *** 595,598 **** --- 595,599 ---- endif + exe 'source '.s:path.'/multicompile.vim' exe 'source '.s:path.'/compiler.vim' exe 'source '.s:path.'/folding.vim' Index: compiler.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/compiler.vim,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** compiler.vim 25 Jul 2003 01:13:21 -0000 1.42 --- compiler.vim 29 Aug 2003 02:29:35 -0000 1.43 *************** *** 40,44 **** \'No '.a:type.' rule defined for target '.target."\n". \'Please specify a rule in texrc.vim'."\n". ! \' :help latex-compiler-target'."\n". \'for more information', \"&ok", 1, 'Warning') --- 40,44 ---- \'No '.a:type.' rule defined for target '.target."\n". \'Please specify a rule in texrc.vim'."\n". ! \' :help Tex_CompileRule_format'."\n". \'for more information', \"&ok", 1, 'Warning') *************** *** 47,51 **** \'No '.a:type.' rule defined for target '.target."\n". \'Please specify a rule in texrc.vim'."\n". ! \' :help latex-compiler-target'."\n". \'for more information' \) --- 47,51 ---- \'No '.a:type.' rule defined for target '.target."\n". \'Please specify a rule in texrc.vim'."\n". ! \' :help Tex_ViewRule_format'."\n". \'for more information' \) *************** *** 85,108 **** " }}} ! " RunLaTeX: compilation function {{{ ! " this function runs the latex command on the currently open file. often times ! " the file being currently edited is only a fragment being \input'ed into some ! " master tex file. in this case, make a file called mainfile.latexmain in the ! " directory containig the file. in other words, if the current file is ! " ~/thesis/chapter.tex ! " so that doing "latex chapter.tex" doesnt make sense, then make a file called ! " main.tex.latexmain ! " in the ~/thesis directory. this will then run "latex main.tex" when ! " RunLaTeX() is called. ! function! RunLaTeX() ! ! call Tex_Debug('getting to RunLaTeX, b:fragmentFile = '.exists('b:fragmentFile')) if &ft != 'tex' echo "calling RunLaTeX from a non-tex file" return end - let dir = expand("%:p:h").'/' - let curd = getcwd() - exec 'cd '.expand("%:p:h") " close any preview windows left open. --- 85,95 ---- " }}} ! " Tex_CompileLatex: compiles the present file. {{{ ! " Description: ! function! Tex_CompileLatex() if &ft != 'tex' echo "calling RunLaTeX from a non-tex file" return end " close any preview windows left open. *************** *** 146,149 **** --- 133,144 ---- endif redraw! + endfunction " }}} + " Tex_SetupErrorWindow: sets up the cwindow and preview of the .log file {{{ + " Description: + function! Tex_SetupErrorWindow() + let mainfname = Tex_GetMainFileName(':r') + if exists('b:fragmentFile') || mainfname == '' + let mainfname = expand('%:t') + endif let winnum = winnr() *************** *** 173,176 **** --- 168,219 ---- endif + endfunction " }}} + " RunLaTeX: compilation function {{{ + " this function runs the latex command on the currently open file. often times + " the file being currently edited is only a fragment being \input'ed into some + " master tex file. in this case, make a file called mainfile.latexmain in the + " directory containig the file. in other words, if the current file is + " ~/thesis/chapter.tex + " so that doing "latex chapter.tex" doesnt make sense, then make a file called + " main.tex.latexmain + " in the ~/thesis directory. this will then run "latex main.tex" when + " RunLaTeX() is called. + function! RunLaTeX() + call Tex_Debug('getting to RunLaTeX, b:fragmentFile = '.exists('b:fragmentFile'), 'comp') + + let dir = expand("%:p:h").'/' + let curd = getcwd() + exec 'cd '.expand("%:p:h") + + " first get the dependency chain of this format. + let dependency = s:target + if exists('g:Tex_FormatDependency_'.s:target) + if g:Tex_FormatDependency_{s:target} !~ ','.s:target.'$' + let dependency = g:Tex_FormatDependency_{s:target}.','.s:target + else + let dependency = g:Tex_FormatDependency_{s:target} + endif + endif + + call Tex_Debug('getting dependency chain = ['.dependency.']', 'comp') + + " now compile to the final target format via each dependency. + let i = 1 + while Tex_Strntok(dependency, ',', i) != '' + let s:target = Tex_Strntok(dependency, ',', i) + call SetTeXCompilerTarget('Compile', s:target) + call Tex_Debug('setting target to '.s:target, 'comp') + + if g:Tex_MultipleCompileFormats =~ '\<'.s:target.'\>' + call Tex_CompileMultipleTimes() + else + call Tex_CompileLatex() + endif + + let i = i + 1 + endwhile + + call Tex_SetupErrorWindow() + exec 'cd '.curd endfunction *************** *** 243,247 **** " }}} ! " ForwardSearchLaTeX: searches for current location in dvi file. {{{ " Description: if the DVI viewr is compatible, then take the viewer to that " position in the dvi file. see docs for RunLaTeX() to set a --- 286,290 ---- " }}} ! " Tex_ForwardSearchLaTeX: searches for current location in dvi file. {{{ " Description: if the DVI viewr is compatible, then take the viewer to that " position in the dvi file. see docs for RunLaTeX() to set a *************** *** 254,258 **** " For inverse search, if you are reading this, then just pressing \ls " will work. ! function! ForwardSearchLaTeX() if &ft != 'tex' echo "calling ViewLaTeX from a non-tex file" --- 297,301 ---- " For inverse search, if you are reading this, then just pressing \ls " will work. ! function! Tex_ForwardSearchLaTeX() if &ft != 'tex' echo "calling ViewLaTeX from a non-tex file" *************** *** 525,534 **** vnoremap <buffer> <Leader>ll :call Tex_PartCompile()<cr> nnoremap <buffer> <Leader>lv :silent! call ViewLaTeX()<cr> ! nnoremap <buffer> <Leader>ls :silent! call ForwardSearchLaTeX()<cr> else nnoremap <buffer> <Leader>ll :call RunLaTeX()<cr> vnoremap <buffer> <Leader>ll :call Tex_PartCompile()<cr> nnoremap <buffer> <Leader>lv :call ViewLaTeX()<cr> ! nnoremap <buffer> <Leader>ls :call ForwardSearchLaTeX()<cr> end end --- 568,577 ---- vnoremap <buffer> <Leader>ll :call Tex_PartCompile()<cr> nnoremap <buffer> <Leader>lv :silent! call ViewLaTeX()<cr> ! nnoremap <buffer> <Leader>ls :silent! call Tex_ForwardSearchLaTeX()<cr> else nnoremap <buffer> <Leader>ll :call RunLaTeX()<cr> vnoremap <buffer> <Leader>ll :call Tex_PartCompile()<cr> nnoremap <buffer> <Leader>lv :call ViewLaTeX()<cr> ! nnoremap <buffer> <Leader>ls :call Tex_ForwardSearchLaTeX()<cr> end end |
From: <sri...@us...> - 2003-08-29 01:37:05
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv5092/ftplugin/latex-suite Modified Files: texmenuconf.vim Log Message: - Some minor outstanding diffs committed so I can release the next version today. Index: texmenuconf.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/texmenuconf.vim,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** texmenuconf.vim 26 Jul 2003 19:52:18 -0000 1.19 --- texmenuconf.vim 29 Aug 2003 01:37:02 -0000 1.20 *************** *** 2,5 **** --- 2,6 ---- " File: texmenuconf.vim " Author: Srinath Avadhanula <sr...@fa...> + " Copyright: Vim charityware license. :help license " Description: " CVS: $Id$ |
From: <sri...@us...> - 2003-08-29 01:37:05
|
Update of /cvsroot/vim-latex/vimfiles/doc In directory sc8-pr-cvs1:/tmp/cvs-serv5092/doc Modified Files: Makefile.in Log Message: - Some minor outstanding diffs committed so I can release the next version today. Index: Makefile.in =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/doc/Makefile.in,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.in 30 Jun 2003 01:21:38 -0000 1.2 --- Makefile.in 29 Aug 2003 01:37:02 -0000 1.3 *************** *** 25,27 **** --- 25,29 ---- db2vim --prefix=lq_ latex-suite-quickstart.xml > latex-suite.txt + cvsci: + cvs ci latex-suite.xml latex-suite.txt # vim:nowrap |
From: <sri...@us...> - 2003-08-29 01:18:37
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv2684 Modified Files: Tag: latex-multi-compile texrc Log Message: removed a required setting in the last commit. Index: texrc =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/texrc,v retrieving revision 1.30.2.2 retrieving revision 1.30.2.3 diff -C2 -d -r1.30.2.2 -r1.30.2.3 *** texrc 29 Aug 2003 01:12:16 -0000 1.30.2.2 --- texrc 29 Aug 2003 01:18:29 -0000 1.30.2.3 *************** *** 103,106 **** --- 103,107 ---- " so use it with care. TexLet g:Tex_CompileRule_dvi = 'latex -interaction=nonstopmode $*' + TexLet g:Tex_EscapeChars = '{}\' TexLet g:Tex_CompileRule_ps = 'dvips -Ppdf -o $*.ps $*.dvi' |
From: <sri...@us...> - 2003-08-29 01:12:19
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv1709 Modified Files: Tag: latex-multi-compile multicompile.vim main.vim texrc Log Message: - a couple of small bugfixes and some rearrangement. Index: multicompile.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/Attic/multicompile.vim,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** multicompile.vim 28 Aug 2003 23:18:39 -0000 1.1.2.1 --- multicompile.vim 29 Aug 2003 01:12:16 -0000 1.1.2.2 *************** *** 10,20 **** " ============================================================================ - " generate a map for compiling multiple times. - nnoremap <buffer> <Plug>Tex_CompileMultipleTimes :call Tex_CompileMultipleTimes()<CR> - - if !hasmapto('<Plug>Tex_CompileMultipleTimes') - nmap <leader>lm <Plug>Tex_CompileMultipleTimes - endif - " Tex_CompileMultipleTimes: compile a latex file multiple times {{{ " Description: compile a latex file multiple times to get cross-references asd --- 10,13 ---- *************** *** 25,43 **** else call Tex_CompileMultipleTimes_Vim() ! endif endfunction " }}} - " TODO: these will need to go into texrc finally. - " use python if available. - let g:Tex_UsePython = 1 - " the system command which pulls in a file. - if !exists('g:Tex_CatCmd') - if &shell =~ 'sh' - let g:Tex_CatCmd = 'cat' - else - let g:Tex_CatCmd = 'type' - endif - endif - if !has('python') || !g:Tex_UsePython " Tex_GotoTempFile: open a temp file. reuse from next time on {{{ --- 18,24 ---- else call Tex_CompileMultipleTimes_Vim() ! endif endfunction " }}} if !has('python') || !g:Tex_UsePython " Tex_GotoTempFile: open a temp file. reuse from next time on {{{ *************** *** 235,239 **** # The first time see if a .idx file has been created. If so we need to # run makeindex. ! if runCount == 0 and os.path.exists(mainFileName_root.'.idx'): idxFileName = mainFileName_root + '.idx' idxlinesBefore = catFile(idxFileName) --- 216,220 ---- # The first time see if a .idx file has been created. If so we need to # run makeindex. ! if runCount == 0 and os.path.exists(mainFileName_root + '.idx'): idxFileName = mainFileName_root + '.idx' idxlinesBefore = catFile(idxFileName) Index: main.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v retrieving revision 1.40 retrieving revision 1.40.2.1 diff -C2 -d -r1.40 -r1.40.2.1 *** main.vim 17 Jun 2003 02:12:29 -0000 1.40 --- main.vim 29 Aug 2003 01:12:16 -0000 1.40.2.1 *************** *** 537,540 **** --- 537,541 ---- endif + exe 'source '.s:path.'/multicompile.vim' exe 'source '.s:path.'/compiler.vim' exe 'source '.s:path.'/folding.vim' Index: texrc =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/texrc,v retrieving revision 1.30.2.1 retrieving revision 1.30.2.2 diff -C2 -d -r1.30.2.1 -r1.30.2.2 *** texrc 28 Aug 2003 23:21:30 -0000 1.30.2.1 --- texrc 29 Aug 2003 01:12:16 -0000 1.30.2.2 *************** *** 62,65 **** --- 62,78 ---- " ============================================================================== + " General settings {{{ + + TexLet g:Tex_UsePython = 1 + + " the system command which pulls in a file. + if &shell =~ 'sh' + TexLet g:Tex_CatCmd = 'cat' + else + TexLet g:Tex_CatCmd = 'type' + endif + + " }}} + " ============================================================================== " Rules: specifications of programs for compiling and viewing {{{ " *************** *** 89,96 **** " but it is known that it can sometimes give different results in the output, " so use it with care. ! let s:CompileFlags = '' ! TexLet g:Tex_EscapeChars = '{}\' ! TexLet g:Tex_CompileRule_dvi = 'latex ' . s:CompileFlags . ! \ ' -interaction=nonstopmode $*' TexLet g:Tex_CompileRule_ps = 'dvips -Ppdf -o $*.ps $*.dvi' --- 102,106 ---- " but it is known that it can sometimes give different results in the output, " so use it with care. ! TexLet g:Tex_CompileRule_dvi = 'latex -interaction=nonstopmode $*' TexLet g:Tex_CompileRule_ps = 'dvips -Ppdf -o $*.ps $*.dvi' |
From: <sri...@us...> - 2003-08-28 23:21:34
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv17625 Modified Files: Tag: latex-multi-compile texrc Log Message: settings for the 2 new features in compilation (multiple compiling and format dependency) Index: texrc =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/texrc,v retrieving revision 1.30 retrieving revision 1.30.2.1 diff -C2 -d -r1.30 -r1.30.2.1 *** texrc 30 Jun 2003 01:28:39 -0000 1.30 --- texrc 28 Aug 2003 23:21:30 -0000 1.30.2.1 *************** *** 29,32 **** --- 29,33 ---- " " NOTE: This file is best viewed with Vim-6.0+ with folding turned on. + " CVS: $Id$ "============================================================================= *************** *** 74,77 **** --- 75,85 ---- endif + " A comma seperated list of formats which need multiple compilations to be + " correctly compiled. + TexLet g:Tex_MultipleCompileFormats = 'dvi' + + " Uncomment this line if you compile ps files via dvi files. + " TexLet g:Tex_FormatDependency_ps = 'dvi,ps' + " ------------------------------------------------------------------------------ " Compiler rules {{{ *************** *** 98,101 **** --- 106,111 ---- TexLet g:Tex_CompileRule_html = 'latex2html $*.tex' + + TexLet g:Tex_CompileRule_bib = 'bibtex $*' " }}} |
From: <sri...@us...> - 2003-08-28 23:20:36
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv17465 Modified Files: Tag: latex-multi-compile compiler.vim Log Message: support for compiling multiple times and handling format dependency Index: compiler.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/compiler.vim,v retrieving revision 1.40 retrieving revision 1.40.2.1 diff -C2 -d -r1.40 -r1.40.2.1 *** compiler.vim 18 Jun 2003 00:57:24 -0000 1.40 --- compiler.vim 28 Aug 2003 23:20:22 -0000 1.40.2.1 *************** *** 40,44 **** \'No '.a:type.' rule defined for target '.target."\n". \'Please specify a rule in texrc.vim'."\n". ! \' :help latex-compiler-target'."\n". \'for more information', \"&ok", 1, 'Warning') --- 40,44 ---- \'No '.a:type.' rule defined for target '.target."\n". \'Please specify a rule in texrc.vim'."\n". ! \' :help Tex_CompileRule_format'."\n". \'for more information', \"&ok", 1, 'Warning') *************** *** 47,51 **** \'No '.a:type.' rule defined for target '.target."\n". \'Please specify a rule in texrc.vim'."\n". ! \' :help latex-compiler-target'."\n". \'for more information' \) --- 47,51 ---- \'No '.a:type.' rule defined for target '.target."\n". \'Please specify a rule in texrc.vim'."\n". ! \' :help Tex_ViewRule_format'."\n". \'for more information' \) *************** *** 85,108 **** " }}} ! " RunLaTeX: compilation function {{{ ! " this function runs the latex command on the currently open file. often times ! " the file being currently edited is only a fragment being \input'ed into some ! " master tex file. in this case, make a file called mainfile.latexmain in the ! " directory containig the file. in other words, if the current file is ! " ~/thesis/chapter.tex ! " so that doing "latex chapter.tex" doesnt make sense, then make a file called ! " main.tex.latexmain ! " in the ~/thesis directory. this will then run "latex main.tex" when ! " RunLaTeX() is called. ! function! RunLaTeX() ! ! call Tex_Debug('getting to RunLaTeX, b:fragmentFile = '.exists('b:fragmentFile')) if &ft != 'tex' echo "calling RunLaTeX from a non-tex file" return end - let dir = expand("%:p:h").'/' - let curd = getcwd() - exec 'cd '.expand("%:p:h") " close any preview windows left open. --- 85,95 ---- " }}} ! " Tex_CompileLatex: compiles the present file. {{{ ! " Description: ! function! Tex_CompileLatex() if &ft != 'tex' echo "calling RunLaTeX from a non-tex file" return end " close any preview windows left open. *************** *** 146,149 **** --- 133,144 ---- endif redraw! + endfunction " }}} + " Tex_SetupErrorWindow: sets up the cwindow and preview of the .log file {{{ + " Description: + function! Tex_SetupErrorWindow() + let mainfname = Tex_GetMainFileName(':r') + if exists('b:fragmentFile') || mainfname == '' + let mainfname = expand('%:t') + endif let winnum = winnr() *************** *** 173,176 **** --- 168,219 ---- endif + endfunction " }}} + " RunLaTeX: compilation function {{{ + " this function runs the latex command on the currently open file. often times + " the file being currently edited is only a fragment being \input'ed into some + " master tex file. in this case, make a file called mainfile.latexmain in the + " directory containig the file. in other words, if the current file is + " ~/thesis/chapter.tex + " so that doing "latex chapter.tex" doesnt make sense, then make a file called + " main.tex.latexmain + " in the ~/thesis directory. this will then run "latex main.tex" when + " RunLaTeX() is called. + function! RunLaTeX() + call Tex_Debug('getting to RunLaTeX, b:fragmentFile = '.exists('b:fragmentFile'), 'comp') + + let dir = expand("%:p:h").'/' + let curd = getcwd() + exec 'cd '.expand("%:p:h") + + " first get the dependency chain of this format. + let dependency = s:target + if exists('g:Tex_FormatDependency_'.s:target) + if g:Tex_FormatDependency_{s:target} !~ ','.s:target.'$' + let dependency = g:Tex_FormatDependency_{s:target}.','.s:target + else + let dependency = g:Tex_FormatDependency_{s:target} + endif + endif + + call Tex_Debug('getting dependency chain = ['.dependency.']', 'comp') + + " now compile to the final target format via each dependency. + let i = 1 + while Tex_Strntok(dependency, ',', i) != '' + let s:target = Tex_Strntok(dependency, ',', i) + call SetTeXCompilerTarget('Compile', s:target) + call Tex_Debug('setting target to '.s:target, 'comp') + + if g:Tex_MultipleCompileFormats =~ '\<'.s:target.'\>' + call Tex_CompileMultipleTimes() + else + call Tex_CompileLatex() + endif + + let i = i + 1 + endwhile + + call Tex_SetupErrorWindow() + exec 'cd '.curd endfunction *************** *** 243,247 **** " }}} ! " ForwardSearchLaTeX: searches for current location in dvi file. {{{ " Description: if the DVI viewr is compatible, then take the viewer to that " position in the dvi file. see docs for RunLaTeX() to set a --- 286,290 ---- " }}} ! " Tex_ForwardSearchLaTeX: searches for current location in dvi file. {{{ " Description: if the DVI viewr is compatible, then take the viewer to that " position in the dvi file. see docs for RunLaTeX() to set a *************** *** 254,258 **** " For inverse search, if you are reading this, then just pressing \ls " will work. ! function! ForwardSearchLaTeX() if &ft != 'tex' echo "calling ViewLaTeX from a non-tex file" --- 297,301 ---- " For inverse search, if you are reading this, then just pressing \ls " will work. ! function! Tex_ForwardSearchLaTeX() if &ft != 'tex' echo "calling ViewLaTeX from a non-tex file" *************** *** 417,421 **** " land us on the error in a.tex. if errfile != '' ! exec 'bot pedit +/(\(\f\|\[\|\]\)*'.errfile.'/ '.a:filename else exec 'bot pedit +0 '.a:filename --- 460,464 ---- " land us on the error in a.tex. if errfile != '' ! exec 'bot pedit +/(\\(\\f\\|\\[\\|\]\\)*'.errfile.'/ '.a:filename else exec 'bot pedit +0 '.a:filename *************** *** 525,534 **** vnoremap <buffer> <Leader>ll :call Tex_PartCompile()<cr> nnoremap <buffer> <Leader>lv :silent! call ViewLaTeX()<cr> ! nnoremap <buffer> <Leader>ls :silent! call ForwardSearchLaTeX()<cr> else nnoremap <buffer> <Leader>ll :call RunLaTeX()<cr> vnoremap <buffer> <Leader>ll :call Tex_PartCompile()<cr> nnoremap <buffer> <Leader>lv :call ViewLaTeX()<cr> ! nnoremap <buffer> <Leader>ls :call ForwardSearchLaTeX()<cr> end end --- 568,577 ---- vnoremap <buffer> <Leader>ll :call Tex_PartCompile()<cr> nnoremap <buffer> <Leader>lv :silent! call ViewLaTeX()<cr> ! nnoremap <buffer> <Leader>ls :silent! call Tex_ForwardSearchLaTeX()<cr> else nnoremap <buffer> <Leader>ll :call RunLaTeX()<cr> vnoremap <buffer> <Leader>ll :call Tex_PartCompile()<cr> nnoremap <buffer> <Leader>lv :call ViewLaTeX()<cr> ! nnoremap <buffer> <Leader>ls :call Tex_ForwardSearchLaTeX()<cr> end end |
From: <sri...@us...> - 2003-08-28 23:18:44
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv17023 Added Files: Tag: latex-multi-compile multicompile.vim Log Message: Functionality for compiling multiple times. (originally in the ../tex/ directory). --- NEW FILE: multicompile.vim --- " ============================================================================ " File: latexm.vim " Author: Srinath Avadhanula " Created: Sat Jul 05 03:00 PM 2003 " Description: compile a .tex file multiple times to get cross references " right. " License: Vim Charityware License " Part of vim-latexSuite: http://vim-latex.sourceforge.net " CVS: $Id: multicompile.vim,v 1.1.2.1 2003/08/28 23:18:39 srinathava Exp $ " ============================================================================ " generate a map for compiling multiple times. nnoremap <buffer> <Plug>Tex_CompileMultipleTimes :call Tex_CompileMultipleTimes()<CR> if !hasmapto('<Plug>Tex_CompileMultipleTimes') nmap <leader>lm <Plug>Tex_CompileMultipleTimes endif " Tex_CompileMultipleTimes: compile a latex file multiple times {{{ " Description: compile a latex file multiple times to get cross-references asd " right. function! Tex_CompileMultipleTimes() if has('python') && g:Tex_UsePython python compileMultipleTimes() else call Tex_CompileMultipleTimes_Vim() endif endfunction " }}} " TODO: these will need to go into texrc finally. " use python if available. let g:Tex_UsePython = 1 " the system command which pulls in a file. if !exists('g:Tex_CatCmd') if &shell =~ 'sh' let g:Tex_CatCmd = 'cat' else let g:Tex_CatCmd = 'type' endif endif if !has('python') || !g:Tex_UsePython " Tex_GotoTempFile: open a temp file. reuse from next time on {{{ " Description: function! Tex_GotoTempFile() if !exists('s:tempFileName') let s:tempFileName = tempname() endif exec 'silent! split '.s:tempFileName endfunction " }}} " Tex_IsPresentInFile: finds if a string str, is present in filename {{{ " Description: function! Tex_IsPresentInFile(regexp, filename) call Tex_GotoTempFile() silent! 1,$ d _ let _report = &report let _sc = &sc set report=9999999 nosc exec 'silent! 0r! '.g:Tex_CatCmd.' '.a:filename set nomod let &report = _report let &sc = _sc if search(a:regexp, 'w') let retVal = 1 else let retVal = 0 endif silent! bd return retVal endfunction " }}} " Tex_CatFile: returns the contents of the file in a string {{{ " Description: function! Tex_CatFile(filename) call Tex_GotoTempFile() silent! 1,$ d _ let _report = &report let _sc = &sc set report=9999999 nosc exec 'silent! 0r! '.g:Tex_CatCmd.' '.a:filename set nomod let _a = @a silent! normal! ggVG"ay let retVal = @a let @a = _a silent! bd let &report = _report let &sc = _sc return retVal endfunction " }}} " Tex_CompileMultipleTimes_Vim: vim implementaion of compileMultipleTimes() {{{ " Description: compiles a file multiple times to get cross-references right. function! Tex_CompileMultipleTimes_Vim() let mainFileName_root = Tex_GetMainFileName(':p:t:r:r') if mainFileName_root == '' let mainFileName_root = expand("%:p:t:r") endif let runCount = 0 let needToRerun = 1 while needToRerun == 1 && runCount < 5 " assume we need to run only once. let needToRerun = 0 " first run latex once. silent! call Tex_CompileLatex() " The first time we see if we need to run bibtex if runCount == 0 && Tex_IsPresentInFile('\\bibdata', mainFileName_root.'.aux') let bibFileName = mainFileName_root . '.bbl' let biblinesBefore = Tex_CatFile(bibFileName) echomsg "running bibtex..." let temp_mp = &mp | let &mp='bibtex' exec 'silent! make '.mainFileName_root let &mp = temp_mp let biblinesAfter = Tex_CatFile(bibFileName) " If the .bbl file changed after running bibtex, we need to " latex again. if biblinesAfter != biblinesBefore echomsg 'need to rerun because bibliography file changed...' let needToRerun = 1 endif endif if runCount == 0 && filereadable(mainFileName_root.'.idx') let idxFileName = mainFileName_root.'.idx' let idxlinesBefore = Tex_CatFile(idxFileName) echomsg "running makeindex..." let temp_mp = &mp | let &mp='makeindex $*.idx' exec 'silent! make '.mainFileName_root let &mp = temp_mp let idxlinesAfter = Tex_CatFile(idxFileName) " If the .idx file changed, then we need to rerun. if idxlinesBefore != idxlinesAfter echomsg 'need to rerun to get index right...' let needToRerun = 1 endif endif " check if latex asks us to rerun if Tex_IsPresentInFile('Rerun to get cross-references right', mainFileName_root.'.log') echomsg "need to rerun to get cross-references right..." let needToRerun = 1 endif let runCount = runCount + 1 endwhile " finally set up the error window and the preview of the log silent! call Tex_SetupErrorWindow() endfunction " }}} finish endif python <<EOF import vim import re, os, string # isPresentInFile: check if regexp is present in the file {{{ def isPresentInFile(regexp, filename): try: fp = open(filename) fcontents = string.join(fp.readlines(), '') fp.close() if re.search(regexp, fcontents): return 1 else: return None except: return None # }}} # catFile: return the contents of a file. {{{ def catFile(fileName): try: file = open(fileName) lines = string.join(file.readlines(), '') file.close() except: lines = '' return lines # }}} # compileMultipleTimes: compile the main file multiple times as needed. {{{ def compileMultipleTimes(): mainFileName_full = vim.eval("Tex_GetMainFileName(':p:r')") mainFileName_root = vim.eval("Tex_GetMainFileName(':p:r:r')") if not mainFileName_root: mainFileName_full = vim.eval('expand("%:p")') mainFileName_root = vim.eval('expand("%:p:r")') runCount = 0 needToRerun = 1 while needToRerun == 1 and runCount < 5: needToRerun = 0 # first run latex once. vim.command('silent! call Tex_CompileLatex()') if runCount == 0 and isPresentInFile(r'\\bibdata', mainFileName_root + '.aux'): bibFileName = mainFileName_root + '.bbl' biblinesBefore = catFile(bibFileName) vim.command('echomsg "running bibtex..."') vim.command('let temp_mp = &mp | let &mp=\'bibtex\'') vim.command('silent! make %s' % mainFileName_root) vim.command('let &mp = temp_mp') biblinesAfter = catFile(bibFileName) # if the .bbl file changed with this bibtex command, then we need # to rerun latex to refresh the bibliography if biblinesAfter != biblinesBefore: vim.command("echomsg 'need to rerun because bibliography file changed...'") needToRerun = 1 # The first time see if a .idx file has been created. If so we need to # run makeindex. if runCount == 0 and os.path.exists(mainFileName_root.'.idx'): idxFileName = mainFileName_root + '.idx' idxlinesBefore = catFile(idxFileName) vim.command('echomsg "running makeindex..."') vim.command("""let temp_mp = &mp | let &mp='makeindex $*.idx'""") vim.command("""silent! make %s""" % mainFileName_root) vim.command("""let &mp = temp_mp""") idxlinesAfter = Tex_CatFile(idxFileName) # If the .idx file changed, then we need to rerun. if idxlinesBefore != idxlinesAfter: vim.command("echomsg 'need to rerun to get index right...'") needToRerun = 1 # check if latex asks us to rerun if isPresentInFile('Rerun to get cross-references right', mainFileName_root + '.log'): vim.command('echomsg "need to rerun to get cross-references right..."') needToRerun = 1 runCount = runCount + 1 # finally set up the error window and the preview of the log vim.command('echomsg "ran latex a total of %d times"' % runCount) vim.command('silent! call Tex_SetupErrorWindow()') # }}} EOF " vim:fdm=marker:nowrap:noet:ff=unix:ts=4:sw=4 |
From: <sri...@us...> - 2003-08-28 23:14:27
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/tex In directory sc8-pr-cvs1:/tmp/cvs-serv16216 Removed Files: Tag: latex-multi-compile latexm.vim Log Message: moving latexm.vim to ../latex-suite/ --- latexm.vim DELETED --- |
From: <sri...@us...> - 2003-08-28 23:12:55
|
Update of /cvsroot/vim-latex/vimfiles/doc In directory sc8-pr-cvs1:/tmp/cvs-serv15750 Modified Files: latex-suite.xml latex-suite.txt Log Message: description of 2 new features: 1. automatically compiling multiple times. 2. handling format dependencies. Index: latex-suite.xml =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/doc/latex-suite.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** latex-suite.xml 22 Aug 2003 22:09:58 -0000 1.12 --- latex-suite.xml 28 Aug 2003 23:12:52 -0000 1.13 *************** *** 1695,1725 **** </para> <note> - <title>Handling Dependencies in compilation</title> <para> ! Specifying a different format does not automatically account for ! dependencies. For example, if in your case, you use ! <programlisting>.tex -> .dvi -> .ps -> .pdf</programlisting> ! to generate PDF files from DVI, then you will need to choose dvi first, ! compile, change format to ps, compile, change format and so on. You could ! automate this via a mapping as follows: ! <programlisting>function! Tex_CompileToPDF() ! TCTarget dvi ! normal \ll ! TCTarget ps ! normal \ll ! TCTarget pdf ! normal \ll ! endfunction ! nmap \pdf :call Tex_CompileToPDF()<CR></programlisting> </para> </note> <note> <para> ! For win32 users user MikTeX, sometimes the latex compiler's output has a ! bug where a single number is split across different lines. In this case, ! put the included <literal>vim-latex</literal> file distributed with &ls;. </para> </note> </section> <section id="latex-master-file"> <title>Specifying which file to compile</title> --- 1695,1814 ---- </para> <note> <para> ! For win32 users user MikTeX, sometimes the latex compiler's output has a ! bug where a single number is split across different lines. In this case, ! put the included <literal>vim-latex</literal> file distributed with &ls;. </para> </note> + </section> + <section id="compiler-dependency"> + <title>Handling dependencies in compilation</title> + <para> + &ls; also handles compiling dependencies automatically via certain + rules which specify the "dependency chain" for each target format. + For example, if in your case, you use + <programlisting>.tex -> .dvi -> .ps -> .pdf</programlisting> + to generate <literal>pdf</literal> files from <literal>dvi</literal> + files, then you will need to specify the following setting in your + latex-suite configuration (see <link + linkend="customizing-latex-suite">customizing &ls;</link> for where + these settings should go): + <programlisting> + let g:Tex_FormatDependency_pdf = 'dvi,ps,pdf' + </programlisting> + This is a comma seperated string of formats specifying the order in + which the formats to be compiled into should be chosen. With this + setting, if you set the target format to <literal>pdf</literal>, then + the next time you compile via the <literal>\ll</literal> shortcut, &ls; + will first generate a <literal>dvi</literal> file, then use that to + generate the <literal>ps</literal> file and finally create the + <literal>pdf</literal> file from that. + </para> <note> <para> ! If any of the intermediate formats is listed in the ! <literal>g:Tex_MultipleCompileFormats</literal> setting as described ! in the section <link linkend="compiling-multiple">Compiling multiple ! times</link>, then &ls; might make multiple calls to the compiler to ! generate the output file of that format. ! </para> ! </note> ! <para> ! Along with the <literal>g:Tex_FormatDependency_{format}</literal> ! setting, you should ofcourse specify the rule for compiling to each of ! the formats as described in the <link linkend="compiler-rules">previous ! section</link>. For example, with the setting above, you could use: ! <programlisting> ! let g:Tex_CompileRule_dvi = 'latex --interaction=nonstopmode $*' ! let g:Tex_CompileRule_ps = 'dvips -Ppdf -o $*.ps $*.dvi' ! let g:Tex_CompileRule_pdf = 'ps2pdf $*.ps' ! </programlisting> ! </para> ! <note> ! <para> ! By default, &ls; does not specify any compiler dependencies. Each ! target format for which a rule has been derived will be compiled ! independently. </para> </note> </section> + <section id="compiling-multiple"> + <title>Compiling multiple times</title> + <para> + Most &latex; compilers need to be re-run several times in several + commonly occuring situations in order to get a final camera ready copy. + For example, when <literal>\label</literal>'s change, when new + <literal>\cite</literal> commands are added etc. If the target format + you are compiling to requires multiple compilations, then you will + need to include the format in the + <literal>g:Tex_MultipleCompileFormats</literal> setting. This is a + comma seperated string of formats which need multiple compilations to + be generated correctly. + </para> + <para> + By default, this setting contains just the <literal>dvi</literal> + format. If you use the <literal>pdflatex</literal> compiler to generate + <literal>pdf</literal> files, then you might want to also include + <literal>pdf</literal> into the above setting. + </para> + <para> + For every format included in the + <literal>g:Tex_MultipleCompileFormats</literal> setting described + above, &ls; will use the following logic to generate the file. Note + that although the following description uses <literal>latex</literal> + to refer to the compiler, it could be some other compiler such as + <literal>pdflatex</literal> for generating <literal>pdf</literal> + output. + </para> + <para> + <orderedlist> + <listitem>First <literal>latex</literal> is run.</listitem> + <listitem>If the <literal>.aux</literal> file generated from the first + step above contains a <literal>\bibdata</literal> line, then it + means that we are using a <literal>.bib</literal> file. Therefore, + &ls; runs <literal>bibtex</literal>.</listitem> + <listitem> + If the <literal>.bbl</literal> file changes because of this, then we + note that we need to rerun &latex; again. + </listitem> + <listitem>If running latex generates a <literal>.idx</literal> file, + then we run <literal>makeindex</literal>. If the + <literal>.idx</literal> file is changed by + <literal>makeindex</literal>, then we note that we need to rerun + latex.</listitem> + <listitem>Also, we check to see if the &latex; compiler gives certain + standard warnings which notify that we need to compile once again. In + this case also, we note that we need to rerun &latex;.</listitem> + <listitem>If we found that we needed to rerun latex, then we repeat + the steps above.</listitem> + </orderedlist> + </para> + <para> + The &latex; file is compiled atmost 5 times using this logic. These + steps will ensure that on most platforms/environments, you will get a + clean output with all the cross-references, citations etc correctly + labelled and ordered. + </para> + </section> <section id="latex-master-file"> <title>Specifying which file to compile</title> *************** *** 3107,3110 **** --- 3196,3242 ---- <literal>-src-specials</literal>. However, this has been known to cause problems with the output file. Therefore, use this with care. + </para> + </section> + <section fd="Tex_FormatDependency_format"> + <title>g:Tex_FormatDependency_<format></title> + <para> + <informaltable frame="all"> + <tgroup cols="2"> + <tbody> + <row><entry>Type</entry><entry>string</entry></row> + <row><entry>Default Value</entry> + <entry><literal>''</literal></entry></row> + </tbody> + </tgroup> + </informaltable> + By default, there are no format dependencies defined. Each definition + is of the form above where <literal><format></literal> is a + string such as <literal>'dvi'</literal> etc. + </para> + <para> + The value of each string is a comma seperated string such as 'dvi,ps'. + See the <link linkend="compiler-dependency">Compiler dependency</link> + section to see how to use/specify this setting + </para> + </section> + <section id="Tex_MultipleCompileFormats"> + <title>g:Tex_MultipleCompileFormats</title> + <para> + <informaltable frame="all"> + <tgroup cols="2"> + <tbody> + <row><entry>Type</entry><entry>string</entry></row> + <row><entry>Default Value</entry> + <entry><literal>'dvi'</literal></entry></row> + </tbody> + </tgroup> + </informaltable> + </para> + <para> + This is a comma seperated string of formats for which the compiler + needs to be called multiple times in order to get cross-references, + citations etc right. See the <link + linkend="compiling-multiple">Compiling multiple times</link> section + for details. </para> </section> Index: latex-suite.txt =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/doc/latex-suite.txt,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** latex-suite.txt 22 Aug 2003 22:09:58 -0000 1.35 --- latex-suite.txt 28 Aug 2003 23:12:52 -0000 1.36 *************** *** 12,16 **** macros to speed up editing LaTeX documents to functions for forward searching .dvi documents. Latex-suite has been possible because of the contributions of ! many people. Please see latex-suite-credits [|ls_a_do|] for a list of people who have helped. --- 12,16 ---- macros to speed up editing LaTeX documents to functions for forward searching .dvi documents. Latex-suite has been possible because of the contributions of ! many people. Please see latex-suite-credits [|ls_a_ds|] for a list of people who have helped. [...1753 lines suppressed...] --- 2705,2709 ---- ================================================================================ ! Credits *ls_11* *ls_a_ds* *latex-suite-credits* *************** *** 2664,2668 **** out who has done what. ! *latex-suite-maintainer* *ls_a_dS* The current maintainer(s) of latex-suite is(are) --- 2759,2763 ---- out who has done what. ! *latex-suite-maintainer* *ls_a_dW* The current maintainer(s) of latex-suite is(are) |
From: <sri...@us...> - 2003-08-28 19:35:40
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/tex In directory sc8-pr-cvs1:/tmp/cvs-serv4949 Modified Files: Tag: filebrowser-branch texviewer.vim Log Message: Very minor bug fix. Index: texviewer.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/tex/texviewer.vim,v retrieving revision 1.31.2.1 retrieving revision 1.31.2.2 diff -C2 -d -r1.31.2.1 -r1.31.2.2 *** texviewer.vim 28 Aug 2003 19:22:14 -0000 1.31.2.1 --- texviewer.vim 28 Aug 2003 19:35:34 -0000 1.31.2.2 *************** *** 170,174 **** " Tex_CompleteWord: inserts a word at the chosen location {{{ " Description: ! function! <SID>Tex_CompleteWord(completeword) exe s:pos --- 170,174 ---- " Tex_CompleteWord: inserts a word at the chosen location {{{ " Description: ! function! Tex_CompleteWord(completeword) exe s:pos |
From: <sri...@us...> - 2003-08-28 19:22:22
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/tex In directory sc8-pr-cvs1:/tmp/cvs-serv2617 Modified Files: Tag: filebrowser-branch texviewer.vim Log Message: Modification and refactoring this file to 1. Make it style-wise consistent with the rest of latex-suite 2. make it use filebrowser.vim instead of the standard explorer.vim Index: texviewer.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/tex/texviewer.vim,v retrieving revision 1.31 retrieving revision 1.31.2.1 diff -C2 -d -r1.31 -r1.31.2.1 *** texviewer.vim 10 Jul 2003 09:52:10 -0000 1.31 --- texviewer.vim 28 Aug 2003 19:22:14 -0000 1.31.2.1 *************** *** 17,21 **** " Tex_SetTexViewerMaps: sets maps for this ftplugin {{{ function! Tex_SetTexViewerMaps() ! inoremap <silent> <Plug>Tex_Completion <Esc>:call Tex_completion("default","text")<CR> if !hasmapto('<Plug>Tex_Completion', 'i') if has('gui_running') --- 17,21 ---- " Tex_SetTexViewerMaps: sets maps for this ftplugin {{{ function! Tex_SetTexViewerMaps() ! inoremap <silent> <Plug>Tex_Completion <Esc>:call Tex_Complete("default","text")<CR> if !hasmapto('<Plug>Tex_Completion', 'i') if has('gui_running') *************** *** 30,73 **** call Tex_SetTexViewerMaps() " }}} ! command -nargs=1 TLook call <SID>Tex_look(<q-args>) ! command -nargs=1 TLookAll call <SID>Tex_lookall(<q-args>) ! command -nargs=1 TLookBib call <SID>Tex_lookbib(<q-args>) ! ! function! s:Tex_lookall(what) ! call Tex_completion(a:what, "all") ! endfunction ! ! function! s:Tex_lookbib(what) ! call Tex_completion(a:what, "bib") ! endfunction ! ! function! s:Tex_look(what) ! call Tex_completion(a:what, "tex") ! endfunction ! ! if getcwd() != expand("%:p:h") ! let s:search_directory = expand("%:p:h") . '/' ! else ! let s:search_directory = '' ! endif ! ! " CompletionVars: similar variables can be set in package files {{{ ! let g:Tex_completion_bibliographystyle = 'abbr,alpha,plain,unsrt' ! let g:Tex_completion_addtocontents = 'lof}{,lot}{,toc}{' ! let g:Tex_completion_addcontentsline = 'lof}{figure}{,lot}{table}{,toc}{chapter}{,toc}{part}{,'. ! \ 'toc}{section}{,toc}{subsection}{,toc}{paragraph}{,'. ! \ 'toc}{subparagraph}{' ! " }}} ! ! " Tex_completion: main function {{{ " Description: ! " ! function! Tex_completion(what, where) " Get info about current window and position of cursor in file let s:winnum = winnr() let s:pos = line('.').' | normal! '.virtcol('.').'|' ! let s:col = col('.') if a:where == "text" --- 30,57 ---- call Tex_SetTexViewerMaps() " }}} + command -nargs=1 TLook call Tex_Complete(<q-args>, 'tex') + command -nargs=1 TLookAll call Tex_Complete(<q-args>, 'all') + command -nargs=1 TLookBib call Tex_Complete(<q-args>, 'bib') ! " ============================================================================== ! " Main completion function ! " ============================================================================== ! " Tex_Complete: main function {{{ " Description: ! function! Tex_Complete(what, where) " Get info about current window and position of cursor in file let s:winnum = winnr() + + " Change to the directory of the file being edited before running all the + " :grep commands. We will change back to the original directory after we + " finish with the grep. + let s:origdir = getcwd() + cd %:p:h + let s:pos = line('.').' | normal! '.virtcol('.').'|' ! ! unlet! s:type ! unlet! s:typeoption if a:where == "text" *************** *** 89,102 **** let s:typeoption = substitute(s:curline, pattern, '\2', 'e') call Tex_Debug('s:type = '.s:type.', typeoption = '.s:typeoption, 'view') - else - unlet! s:type - unlet! s:typeoption endif if exists("s:type") && s:type =~ 'ref' ! call Tex_Debug("silent! grep! '".Tex_EscapeForGrep('\label{'.s:prefix)."' ".s:search_directory.'*.tex', 'view') ! exec "silent! grep! '".Tex_EscapeForGrep('\label{'.s:prefix)."' ".s:search_directory.'*.tex' redraw! ! call <SID>Tex_c_window_setup() elseif exists("s:type") && s:type =~ 'cite' --- 73,83 ---- let s:typeoption = substitute(s:curline, pattern, '\2', 'e') call Tex_Debug('s:type = '.s:type.', typeoption = '.s:typeoption, 'view') endif if exists("s:type") && s:type =~ 'ref' ! call Tex_Debug("silent! grep! '".Tex_EscapeForGrep('\label{'.s:prefix)."' *.tex", 'view') ! exec "silent! grep! '".Tex_EscapeForGrep('\label{'.s:prefix)."' *.tex" redraw! ! call <SID>Tex_SetupCWindow() elseif exists("s:type") && s:type =~ 'cite' *************** *** 109,118 **** silent! grep! ____HIGHLY_IMPROBABLE___ % if g:Tex_RememberCiteSearch && exists('s:citeSearchHistory') ! call <SID>Tex_c_window_setup(s:citeSearchHistory) else call Tex_Debug('calling Tex_GrepForBibItems', 'bib') call Tex_GrepForBibItems(s:prefix) redraw! ! call <SID>Tex_c_window_setup() endif if g:Tex_RememberCiteSearch && &ft == 'qf' --- 90,99 ---- silent! grep! ____HIGHLY_IMPROBABLE___ % if g:Tex_RememberCiteSearch && exists('s:citeSearchHistory') ! call <SID>Tex_SetupCWindow(s:citeSearchHistory) else call Tex_Debug('calling Tex_GrepForBibItems', 'bib') call Tex_GrepForBibItems(s:prefix) redraw! ! call <SID>Tex_SetupCWindow() endif if g:Tex_RememberCiteSearch && &ft == 'qf' *************** *** 124,154 **** elseif exists("s:type") && (s:type =~ 'includegraphics' || s:type == 'psfig') ! let s:storehidefiles = g:explHideFiles ! let g:explHideFiles = '^\.,\.tex$,\.bib$,\.bbl$,\.zip$,\.gz$' ! exe 'silent! Sexplore '.s:search_directory.g:Tex_ImageDir ! call <SID>Tex_explore_window("includegraphics") elseif exists("s:type") && s:type == 'bibliography' ! let s:storehidefiles = g:explHideFiles ! let g:explHideFiles = '^\.,\.[^b]..$' ! exe 'silent! Sexplore '.s:search_directory ! call <SID>Tex_explore_window("bibliography") elseif exists("s:type") && s:type =~ 'include\(only\)\=' ! let s:storehidefiles = g:explHideFiles ! let g:explHideFiles = '^\.,\.[^t]..$' ! exe 'silent! Sexplore '.s:search_directory ! call <SID>Tex_explore_window("includefile") elseif exists("s:type") && s:type == 'input' ! exe 'silent! Sexplore '.s:search_directory ! call <SID>Tex_explore_window("input") elseif exists('s:type') && exists("g:Tex_completion_".s:type) ! call <SID>CompleteName('plugin_'.s:type) ! ! elseif exists("s:type") && g:Tex_completion_explorer =~ ','.s:type ! exe 'silent! Sexplore '.s:search_directory ! call <SID>Tex_explore_window("plugintype") else --- 105,133 ---- elseif exists("s:type") && (s:type =~ 'includegraphics' || s:type == 'psfig') ! call Tex_SetupFileCompletion( ! \ '', ! \ '^\.\\|\.tex$\\|\.bib$\\|\.bbl$\\|\.zip$\\|\.gz$', ! \ 'noext') elseif exists("s:type") && s:type == 'bibliography' ! call Tex_SetupFileCompletion( ! \ '\.b..$', ! \ '', ! \ 'noext') elseif exists("s:type") && s:type =~ 'include\(only\)\=' ! call Tex_SetupFileCompletion( ! \ '\.t..$', ! \ '', ! \ 'noext') elseif exists("s:type") && s:type == 'input' ! call Tex_SetupFileCompletion( ! \ '', ! \ '', ! \ 'ext') elseif exists('s:type') && exists("g:Tex_completion_".s:type) ! call <SID>Tex_CompleteRefCiteCustom('plugin_'.s:type) else *************** *** 164,197 **** endif endif ! call Tex_Debug("silent! grep! '\\<".s:word."' ".s:search_directory.'*.tex', 'view') ! exe "silent! grep! '\\<".s:word."' ".s:search_directory.'*.tex' ! call <SID>Tex_c_window_setup() endif elseif a:where == 'tex' " Process :TLook command ! exe "silent! grep! '".a:what."' ".s:search_directory.'*.tex' ! call <SID>Tex_c_window_setup() elseif a:where == 'bib' " Process :TLookBib command ! exe "silent! grep! '".a:what."' ".s:search_directory.'*.bib' ! exe "silent! grepadd! '".a:what."' ".s:search_directory.'*.bbl' ! call <SID>Tex_c_window_setup() elseif a:where == 'all' " Process :TLookAll command ! exe "silent! grep! '".a:what."' ".s:search_directory.'*' ! call <SID>Tex_c_window_setup() endif endfunction " }}} ! " Tex_c_window_setup: set maps and local settings for cwindow {{{ " Description: Set local maps jkJKq<cr> for cwindow. Also size and basic " settings " ! function! s:Tex_c_window_setup(...) ! call Tex_Debug('+Tex_c_window_setup', 'view') cclose exe 'copen '. g:Tex_ViewerCwindowHeight --- 143,268 ---- endif endif ! call Tex_Debug("silent! grep! '\\<".s:word."' *.tex", 'view') ! exe "silent! grep! '\\<".s:word."' *.tex" + call <SID>Tex_SetupCWindow() endif elseif a:where == 'tex' " Process :TLook command ! exe "silent! grep! '".a:what."' *.tex" ! call <SID>Tex_SetupCWindow() elseif a:where == 'bib' " Process :TLookBib command ! exe "silent! grep! '".a:what."' *.bib" ! exe "silent! grepadd! '".a:what."' *.bbl" ! call <SID>Tex_SetupCWindow() elseif a:where == 'all' " Process :TLookAll command ! exe "silent! grep! '".a:what."' *" ! call <SID>Tex_SetupCWindow() ! endif ! ! endfunction " }}} + " Tex_CompleteWord: inserts a word at the chosen location {{{ + " Description: + function! <SID>Tex_CompleteWord(completeword) + exe s:pos + + " Complete word, check if add closing } + exe 'normal! a'.a:completeword."\<Esc>" + + if getline('.')[col('.')-1] !~ '{' && getline('.')[col('.')] !~ '}' + exe "normal! a}\<Esc>" + endif + + " Return to Insert mode + if col('.') == strlen(getline('.')) + startinsert! + else + normal! l + startinsert endif endfunction " }}} ! ! " ============================================================================== ! " File name completion helper functons ! " ============================================================================== ! " Tex_SetupFileCompletion: {{{ ! " Description: ! function! Tex_SetupFileCompletion(accept, reject, ext) ! call FB_SetVar('FB_AllowRegexp', a:accept) ! call FB_SetVar('FB_RejectRegexp', a:reject) ! call FB_SetVar('FB_CallBackFunction', 'Tex_CompleteFileName') ! call FB_SetVar('FB_CallBackFunctionArgs', '"'.a:ext.'"') ! ! call FB_OpenFileBrowser('.') ! endfunction " }}} ! " Tex_CompleteFileName: {{{ ! " Description: ! function! Tex_CompleteFileName(filename, ext) ! call Tex_Debug('getting filename = '.a:filename, 'view') ! ! let completeword = Tex_RelPath(a:filename, expand('%:p')) ! if a:ext == 'noext' ! let completeword = fnamemodify(completeword, ':r') ! endif ! ! call Tex_CompleteWord(completeword) ! endfunction " }}} ! " Tex_Common: common part of strings {{{ ! function! s:Tex_Common(path1, path2) ! " Assume the caller handles 'ignorecase' ! if a:path1 == a:path2 ! return a:path1 ! endif ! let n = 0 ! while a:path1[n] == a:path2[n] ! let n = n+1 ! endwhile ! return strpart(a:path1, 0, n) ! endfunction " }}} ! " Tex_NormalizePath: {{{ ! " Description: ! function! Tex_NormalizePath(path) ! let retpath = a:path ! if has("win32") || has("win16") || has("dos32") || has("dos16") ! let retpath = substitute(retpath, '\\', '/', 'ge') ! endif ! if isdirectory(retpath) && retpath !~ '/$' ! let retpath = retpath.'/' ! endif ! return retpath ! endfunction " }}} ! " Tex_RelPath: ultimate file name {{{ ! function! Tex_RelPath(explfilename,texfilename) ! let path1 = Tex_NormalizePath(a:explfilename) ! let path2 = Tex_NormalizePath(a:texfilename) ! ! let n = matchend(<SID>Tex_Common(path1, path2), '.*/') ! let path1 = strpart(path1, n) ! let path2 = strpart(path2, n) ! if path2 !~ '/' ! let subrelpath = '' ! else ! let subrelpath = substitute(path2, '[^/]\{-}/', '../', 'ge') ! let subrelpath = substitute(subrelpath, '[^/]*$', '', 'ge') ! endif ! let relpath = subrelpath.path1 ! return escape(Tex_NormalizePath(relpath), ' ') ! endfunction " }}} ! ! " ============================================================================== ! " Ref/Cite completion helper functions ! " ============================================================================== ! " Tex_SetupCWindow: set maps and local settings for cwindow {{{ " Description: Set local maps jkJKq<cr> for cwindow. Also size and basic " settings " ! function! s:Tex_SetupCWindow(...) ! call Tex_Debug('+Tex_SetupCWindow', 'view') cclose exe 'copen '. g:Tex_ViewerCwindowHeight *************** *** 208,212 **** let s:scrollOffVal = &scrolloff ! call <SID>UpdateViewerWindow() " If everything went well, then we should be situated in the quickfix --- 279,283 ---- let s:scrollOffVal = &scrolloff ! call <SID>Tex_SyncPreviewWindow() " If everything went well, then we should be situated in the quickfix *************** *** 218,277 **** endif ! nnoremap <buffer> <silent> j j:call <SID>UpdateViewerWindow()<CR> ! nnoremap <buffer> <silent> k k:call <SID>UpdateViewerWindow()<CR> ! nnoremap <buffer> <silent> <up> <up>:call <SID>UpdateViewerWindow()<CR> ! nnoremap <buffer> <silent> <down> <down>:call <SID>UpdateViewerWindow()<CR> " Change behaviour of <cr> only for 'ref' and 'cite' context. ! if exists("s:type") && s:type =~ 'ref' ! exec 'nnoremap <buffer> <silent> <cr> :set scrolloff='.s:scrollOffVal.'<CR>:silent! call <SID>CompleteName("ref")<CR>' ! ! elseif exists("s:type") && s:type =~ 'cite' ! exec 'nnoremap <buffer> <silent> <cr> :set scrolloff='.s:scrollOffVal.'<CR>:silent! call <SID>CompleteName("cite")<CR>' else " In other contexts jump to place described in cwindow and close small " windows ! exec 'nnoremap <buffer> <silent> <cr> :set scrolloff='.s:scrollOffVal.'<CR>:call <SID>GoToLocation()<cr>' endif nnoremap <buffer> <silent> J :wincmd j<cr><c-e>:wincmd k<cr> nnoremap <buffer> <silent> K :wincmd j<cr><c-y>:wincmd k<cr> ! exe 'nnoremap <buffer> <silent> q :set scrolloff='.s:scrollOffVal.'<CR>:call Tex_CloseSmallWindows()<cr>' endfunction " }}} ! " Tex_CloseSmallWindows: {{{ ! " Description: ! " ! function! Tex_CloseSmallWindows() ! exe s:winnum.' wincmd w' ! pclose! ! cclose ! exe s:pos ! endfunction " }}} ! " Tex_explore_window: settings for completion of filenames {{{ ! " Description: " ! function! s:Tex_explore_window(type) ! exe g:Tex_ExplorerHeight.' wincmd _' ! if a:type =~ 'includegraphics\|bibliography\|includefile' ! nnoremap <silent> <buffer> <cr> :silent! call <SID>CompleteName("expl_noext")<CR> ! elseif a:type =~ 'input\|plugintype' ! nnoremap <silent> <buffer> <cr> :silent! call <SID>CompleteName("expl_ext")<CR> ! endif ! nnoremap <silent> <buffer> q :wincmd q<cr> endfunction " }}} ! " UpdateViewerWindow: update error and preview window {{{ " Description: Usually quickfix engine takes care about most of these things " but we discard it for better control of events. " ! function! s:UpdateViewerWindow() ! call Tex_Debug('+UpdateViewerWindow', 'view') let viewfile = matchstr(getline('.'), '^\f*\ze|\d') --- 289,357 ---- endif ! nnoremap <buffer> <silent> j j:call <SID>Tex_SyncPreviewWindow()<CR> ! nnoremap <buffer> <silent> k k:call <SID>Tex_SyncPreviewWindow()<CR> ! nnoremap <buffer> <silent> <up> <up>:call <SID>Tex_SyncPreviewWindow()<CR> ! nnoremap <buffer> <silent> <down> <down>:call <SID>Tex_SyncPreviewWindow()<CR> " Change behaviour of <cr> only for 'ref' and 'cite' context. ! if exists("s:type") && s:type =~ 'ref\|cite' ! exec 'nnoremap <buffer> <silent> <cr> ' ! \ .':set scrolloff='.s:scrollOffVal.'<CR>' ! \ .':cd '.s:origdir.'<CR>' ! \ .':silent! call <SID>Tex_CompleteRefCiteCustom("'.s:type.'")<CR>' else " In other contexts jump to place described in cwindow and close small " windows ! exec 'nnoremap <buffer> <silent> <cr> ' ! \ .':set scrolloff='.s:scrollOffVal.'<CR>' ! \ .':cd '.s:origdir.'<CR>' ! \ .':call <SID>Tex_GoToLocation()<cr>' endif + " Scroll the preview window while in the quickfix window nnoremap <buffer> <silent> J :wincmd j<cr><c-e>:wincmd k<cr> nnoremap <buffer> <silent> K :wincmd j<cr><c-y>:wincmd k<cr> ! " Exit the quickfix window without doing anything. ! exe 'nnoremap <buffer> <silent> q ' ! \ .':set scrolloff='.s:scrollOffVal.'<CR>' ! \ .':cd '.s:origdir.'<CR>' ! \ .':call Tex_CloseSmallWindows()<CR>' endfunction " }}} ! " Tex_CompleteRefCiteCustom: complete/insert name for current item {{{ ! " Description: handle completion of items depending on current context " ! function! s:Tex_CompleteRefCiteCustom(type) ! if a:type =~ 'cite' ! if getline('.') =~ '\\bibitem{' ! let bibkey = matchstr(getline('.'), '\\bibitem{\zs.\{-}\ze}') ! else ! let bibkey = matchstr(getline('.'), '{\zs.\{-}\ze,') ! endif ! let completeword = strpart(bibkey, strlen(s:prefix)) ! elseif a:type =~ 'ref' ! let label = matchstr(getline('.'), '\\label{\zs.\{-}\ze}') ! let completeword = strpart(label, strlen(s:prefix)) ! elseif a:type =~ '^plugin_' ! let type = substitute(a:type, '^plugin_', '', '') ! let completeword = <SID>Tex_DoCompletion(type) ! ! endif + call Tex_CloseSmallWindows() + call Tex_CompleteWord(completeword) endfunction " }}} ! " Tex_SyncPreviewWindow: synchronize quickfix and preview window {{{ " Description: Usually quickfix engine takes care about most of these things " but we discard it for better control of events. " ! function! s:Tex_SyncPreviewWindow() ! call Tex_Debug('+Tex_SyncPreviewWindow', 'view') let viewfile = matchstr(getline('.'), '^\f*\ze|\d') *************** *** 311,315 **** endif let v:errmsg = '' ! call Tex_Debug('UpdateViewerWindow: got error E32, no matches found, quitting', 'view') return 0 endif --- 391,395 ---- endif let v:errmsg = '' ! call Tex_Debug('Tex_SyncPreviewWindow: got error E32, no matches found, quitting', 'view') return 0 endif *************** *** 336,430 **** endfunction " }}} ! " CompleteName: complete/insert name for current item {{{ ! " Description: handle completion of items depending on current context " ! function! s:CompleteName(type) ! ! if a:type =~ 'cite' ! if getline('.') =~ '\\bibitem{' ! let bibkey = matchstr(getline('.'), '\\bibitem{\zs.\{-}\ze}') ! else ! let bibkey = matchstr(getline('.'), '{\zs.\{-}\ze,') ! endif ! let completeword = strpart(bibkey, strlen(s:prefix)) ! ! elseif a:type =~ 'ref' ! let label = matchstr(getline('.'), '\\label{\zs.\{-}\ze}') ! let completeword = strpart(label, strlen(s:prefix)) ! ! elseif a:type =~ 'expl_ext\|expl_noext' ! let line = substitute(strpart(getline('.'),0,b:maxFileLen),'\s\+$','','') ! if isdirectory(b:completePath.line) ! call EditEntry("", "edit") ! exe 'nnoremap <silent> <buffer> <cr> :silent! call <SID>CompleteName("'.a:type.'")<CR>' ! nnoremap <silent> <buffer> q :wincmd q<cr> ! return ! ! else ! if a:type == 'expl_noext' ! let ifile = substitute(line, '\..\{-}$', '', '') ! else ! let ifile = line ! endif ! let filename = b:completePath.ifile ! ! if g:Tex_ImageDir != '' && s:type =~ 'includegraphics' ! let imagedir = s:curfile . g:Tex_ImageDir ! let completeword = <SID>Tex_RelPath(filename, imagedir) ! else ! let completeword = <SID>Tex_RelPath(filename, s:curfile) ! endif ! ! let g:explHideFiles = s:storehidefiles ! endif ! ! elseif a:type =~ '^plugin_' ! let type = substitute(a:type, '^plugin_', '', '') ! let completeword = <SID>Tex_DoCompletion(type) ! ! endif ! ! " Return to proper place in main window, close small windows ! if s:type =~ 'cite\|ref' ! exe s:winnum.' wincmd w' ! pclose! ! cclose ! elseif a:type =~ 'expl_ext\|expl_noext' ! q ! endif ! exe s:pos - - - " Complete word, check if add closing } - exe 'normal! a'.completeword."\<Esc>" - - if getline('.')[col('.')-1] !~ '{' && getline('.')[col('.')] !~ '}' - exe "normal! a}\<Esc>" - endif - - " Return to Insert mode - if col('.') == strlen(getline('.')) - startinsert! - - else - normal! l - startinsert - - endif - endfunction " }}} ! " GoToLocation: Go to chosen location {{{ " Description: Get number of current line and go to this number " ! function! s:GoToLocation() ! pclose! ! exe 'cc ' . line('.') cclose ! endfunction " }}} " Bibliography specific functions " Tex_GrepForBibItems: grep main filename for bib items {{{ " Description: --- 416,449 ---- endfunction " }}} ! " Tex_CloseSmallWindows: {{{ ! " Description: " ! function! Tex_CloseSmallWindows() ! exe s:winnum.' wincmd w' ! pclose! ! cclose exe s:pos endfunction " }}} ! ! " Tex_GoToLocation: Go to chosen location {{{ " Description: Get number of current line and go to this number " ! function! s:Tex_GoToLocation() pclose! ! let errmsg = v:errmsg ! let v:errmsg = '' ! exe 'silent! cc ' . line('.') ! " If the current buffer is modified, then split ! if v:errmsg =~ '^E37:' ! split ! exe 'silent! cc ' . line('.') ! endif cclose ! let v:errmsg = errmsg endfunction " }}} + " ============================================================================== " Bibliography specific functions + " ============================================================================== " Tex_GrepForBibItems: grep main filename for bib items {{{ " Description: *************** *** 578,584 **** endfunction " }}} ! " PromptForCompletion: prompts for a completion {{{ " Description: ! function! s:PromptForCompletion(texcommand,ask) let common_completion_prompt = --- 597,613 ---- endfunction " }}} ! " ============================================================================== ! " Custom Completion help functions/settings ! " ============================================================================== ! " Tex_completion_{var}: similar variables can be set in package files {{{ ! let g:Tex_completion_bibliographystyle = 'abbr,alpha,plain,unsrt' ! let g:Tex_completion_addtocontents = 'lof}{,lot}{,toc}{' ! let g:Tex_completion_addcontentsline = 'lof}{figure}{,lot}{table}{,toc}{chapter}{,toc}{part}{,'. ! \ 'toc}{section}{,toc}{subsection}{,toc}{paragraph}{,'. ! \ 'toc}{subparagraph}{' ! " }}} ! " Tex_PromptForCompletion: prompts for a completion {{{ " Description: ! function! s:Tex_PromptForCompletion(texcommand,ask) let common_completion_prompt = *************** *** 599,603 **** " function! s:Tex_DoCompletion(texcommand) ! let completion = <SID>PromptForCompletion(a:texcommand,'Choose a completion to insert: ') if completion != '' return completion --- 628,632 ---- " function! s:Tex_DoCompletion(texcommand) ! let completion = <SID>Tex_PromptForCompletion(a:texcommand, 'Choose a completion to insert: ') if completion != '' return completion *************** *** 605,644 **** return '' endif - endfunction " }}} - - " Tex_Common: common part of strings {{{ - function! s:Tex_Common(path1, path2) - " Assume the caller handles 'ignorecase' - if a:path1 == a:path2 - return a:path1 - endif - let n = 0 - while a:path1[n] == a:path2[n] - let n = n+1 - endwhile - return strpart(a:path1, 0, n) - endfunction " }}} - " Tex_RelPath: ultimate file name {{{ - function! s:Tex_RelPath(explfilename,texfilename) - let path1 = a:explfilename - let path2 = a:texfilename - if has("win32") || has("win16") || has("dos32") || has("dos16") - let path1 = substitute(path1, '\\', '/', 'ge') - let path2 = substitute(path2, '\\', '/', 'ge') - endif - let n = matchend(<SID>Tex_Common(path1, path2), '.*/') - let path1 = strpart(path1, n) - let path2 = strpart(path2, n) - if path2 !~ '/' - let subrelpath = '' - else - let subrelpath = substitute(path2, '[^/]\{-}/', '../', 'ge') - let subrelpath = substitute(subrelpath, '[^/]*$', '', 'ge') - endif - let relpath = subrelpath.path1 - if has("win32") || has("win16") || has("dos32") || has("dos16") - let relpath = substitute(relpath, '/', "\\", 'ge') - endif - return relpath endfunction " }}} --- 634,637 ---- |
From: <sri...@us...> - 2003-08-28 19:19:40
|
Update of /cvsroot/vim-latex/vimfiles/plugin In directory sc8-pr-cvs1:/tmp/cvs-serv2131 Added Files: Tag: filebrowser-branch filebrowser.vim Log Message: A lightwieght replacement for explorer.vim so we need not interefere with the vim distro. --- NEW FILE: filebrowser.vim --- " filebrowser.vim: utility file for vim 6.2+ " " Copyright: Srinath Avadhanula <srinath AT fastmail DOT fm> " Parts of this file are taken from explorer.vim which is a plugin file " distributed with vim under the Vim charityware license. " License: distributed under the Vim charityware license. " " Settings: " FB_CallBackFunction: the function name which gets called when the user " presses <cr> on a file-name in the file browser. " FB_AllowRegexp: A filename has to match this regexp to be displayed. " FB_RejectRegexp: If a filename matches this regexp, then its not displayed. " (Both these regexps are '' by default which means no filtering is " done). "====================================================================== " Globally visible functions (API) "====================================================================== " FB_OpenFileBrowser: opens a new buffer and displays the file list {{{ " Description: function! FB_OpenFileBrowser(dir) if !isdirectory(a:dir) return endif if exists('s:FB_BufferNumber') if bufwinnr(s:FB_BufferNumber) != -1 execute bufwinnr(s:FB_BufferNumber).' wincmd w' return endif execute 'aboveleft split #'.s:FB_BufferNumber else aboveleft split __Choose_File__ let s:FB_BufferNumber = bufnr('%') endif call FB_DisplayFiles(a:dir) endfunction " }}} " FB_DisplayFiles: displays the files in a given directory {{{ " Description: " Call this function only when the cursor is in a temporary buffer function! FB_DisplayFiles(dir) if !isdirectory(a:dir) return endif call s:FB_SetSilentSettings() " make this a "scratch" buffer call s:FB_SetScratchSettings() let allowRegexp = s:FB_GetVar('FB_AllowRegexp', '') let rejectRegexp = s:FB_GetVar('FB_RejectRegexp', '') " change to the directory to make processing simpler. execute "lcd ".a:dir " delete everything in the buffer. " IMPORTANT: we need to be in a scratch buffer 0,$ d_ let allFilenames = glob('*') let dispFiles = "" let subDirs = "../\n" let i = 1 while 1 let filename = s:FB_Strntok(allFilenames, "\n", i) if filename == '' break endif if isdirectory(filename) let subDirs = subDirs.filename."/\n" else if allowRegexp != '' && filename !~ allowRegexp elseif rejectRegexp != '' && filename =~ rejectRegexp else let dispFiles = dispFiles.filename."\n" endif endif let i = i + 1 endwhile 0put!=dispFiles 0put!=subDirs " delte the last empty line resulting from the put $ d_ call s:FB_SetHighlighting() call s:FB_DisplayHelp() call s:FB_SetMaps() " goto the first file/directory 0 call search('^"=', 'w') normal! j:<bs> set nomodified nomodifiable call s:FB_ResetSilentSettings() endfunction " }}} " FB_SetVar: sets script local variables from outside this script {{{ " Description: function! FB_SetVar(varname, value) let s:{a:varname} = a:value endfunction " }}} " FB_SetHighlighting: sets syntax highlighting for the buffer {{{ " Description: " Origin: from explorer.vim in vim function! <SID>FB_SetHighlighting() " Set up syntax highlighting " Something wrong with the evaluation of the conditional though... if has("syntax") && exists("g:syntax_on") && !has("syntax_items") syn match browseSynopsis "^\"[ -].*" syn match browseDirectory "[^\"].*/ " syn match browseDirectory "[^\"].*/$" syn match browseCurDir "^\"= .*$" syn match browseSortBy "^\" Sorted by .*$" contains=browseSuffixInfo syn match browseSuffixInfo "(.*)$" contained syn match browseFilter "^\" Not Showing:.*$" syn match browseFiletime "«\d\+$" "hi def link browseSynopsis PreProc hi def link browseSynopsis Special hi def link browseDirectory Directory hi def link browseCurDir Statement hi def link browseSortBy String hi def link browseSuffixInfo Type hi def link browseFilter String hi def link browseFiletime Ignore hi def link browseSuffixes Type endif endfunction " }}} " FB_SetMaps: sets buffer local maps {{{ " Description: function! <SID>FB_SetMaps() nnoremap <buffer> <silent> q :bdelete<cr> nnoremap <buffer> <silent> C :call FB_DisplayFiles(getcwd())<CR> nnoremap <buffer> <silent> <esc> :bdelete<cr> nnoremap <buffer> <silent> <CR> :call <SID>FB_EditEntry()<CR> nnoremap <buffer> <silent> ? :call <SID>FB_ToggleHelp()<CR> " lock the user in this window nnoremap <buffer> <C-w> <nop> endfunction " }}} " FB_SetSilentSettings: some settings which make things silent {{{ " Description: " Origin: from explorer.vim distributed with vim. function! <SID>FB_SetSilentSettings() let s:save_report=&report let s:save_showcmd = &sc set report=10000 noshowcmd endfunction " FB_ResetSilentSettings: reset settings set by FB_SetSilentSettings " Description: function! <SID>FB_ResetSilentSettings() let &report=s:save_report let &showcmd = s:save_showcmd endfunction " }}} " FB_SetScratchSettings: makes the present buffer a scratch buffer {{{ " Description: function! <SID>FB_SetScratchSettings() " Turn off the swapfile, set the buffer type so that it won't get " written, and so that it will get deleted when it gets hidden. setlocal noreadonly modifiable setlocal noswapfile setlocal buftype=nowrite setlocal bufhidden=delete " Don't wrap around long lines setlocal nowrap endfunction " }}} " FB_ToggleHelp: toggles verbosity of help {{{ " Description: function! <SID>FB_ToggleHelp() let s:FB_VerboseHelp = 1 - s:FB_GetVar('FB_VerboseHelp', 0) call FB_DisplayFiles('.') endfunction " }}} " FB_DisplayHelp: displays a helpful header {{{ " Description: function! <SID>FB_DisplayHelp() let verboseHelp = s:FB_GetVar('FB_VerboseHelp', 0) if verboseHelp let txt = \ "\" <cr>: on file, choose the file and quit\n" \ ."\" on dir, enter directory\n" \ ."\" q/<esc>: quit without choosing\n" \ ."\" C: change directory to getcwd()\n" \ ."\" ?: toggle help verbosity\n" \ ."\"= ".getcwd() else let txt = "\" ?: toggle help verbosity\n" \ ."\"= ".getcwd() endif 0put!=txt endfunction " }}} " Handles various actions in the file-browser " FB_EditEntry: handles the user pressing <enter> on a line {{{ " Description: function! <SID>FB_EditEntry() let line = getline('.') if isdirectory(line) call FB_DisplayFiles(line) endif " If the user has a call back function defined on choosing a file, handle " it. let cbf = s:FB_GetVar('FB_CallBackFunction', '') if cbf != '' && line !~ '^" ' && filereadable(line) let fname = fnamemodify(line, ':p') bdelete let arguments = s:FB_GetVar('FB_CallBackFunctionArgs', '') if arguments != '' let arguments = ','.arguments endif call Tex_Debug('arguments = '.arguments, 'fb') call Tex_Debug("call ".cbf."('".fname."'".arguments.')', 'fb') exec "call ".cbf."('".fname."'".arguments.')' endif endfunction " }}} " FB_Strntok (string, tok, n) {{{ " extract the n^th token from s seperated by tok. " example: FB_Strntok('1,23,3', ',', 2) = 23 fun! <SID>FB_Strntok(s, tok, n) return matchstr( a:s.a:tok[0], '\v(\zs([^'.a:tok.']*)\ze['.a:tok.']){'.a:n.'}') endfun " }}} " FB_GetVar: gets the most local value of a variable {{{ function! <SID>FB_GetVar(name, default) if exists('s:'.a:name) return s:{a:name} elseif exists('w:'.a:name) return w:{a:name} elseif exists('b:'.a:name) return b:{a:name} elseif exists('g:'.a:name) return g:{a:name} else return a:default endif endfunction " }}} " vim:fdm=marker:ff=unix:noet:ts=4:sw=4:nowrap |
From: <sri...@us...> - 2003-08-28 19:17:57
|
Update of /cvsroot/vim-latex/vimfiles/plugin In directory sc8-pr-cvs1:/tmp/cvs-serv1681 Removed Files: filebrowser.vim Log Message: Botch up with the previous addition. It got added in the main branch. I am removing it from there and adding it into the branch as promised. --- filebrowser.vim DELETED --- |
From: <sri...@us...> - 2003-08-28 19:16:33
|
Update of /cvsroot/vim-latex/vimfiles/plugin In directory sc8-pr-cvs1:/tmp/cvs-serv1368 Added Files: filebrowser.vim Log Message: A lightweight replacement for explorer.vim so we can remove that. NOTE: This is a commit on a branch. Do not use this for any production purposes. --- NEW FILE: filebrowser.vim --- " filebrowser.vim: utility file for vim 6.2+ " " Copyright: Srinath Avadhanula <srinath AT fastmail DOT fm> " Parts of this file are taken from explorer.vim which is a plugin file " distributed with vim under the Vim charityware license. " License: distributed under the Vim charityware license. " " Settings: " FB_CallBackFunction: the function name which gets called when the user " presses <cr> on a file-name in the file browser. " FB_AllowRegexp: A filename has to match this regexp to be displayed. " FB_RejectRegexp: If a filename matches this regexp, then its not displayed. " (Both these regexps are '' by default which means no filtering is " done). "====================================================================== " Globally visible functions (API) "====================================================================== " FB_OpenFileBrowser: opens a new buffer and displays the file list {{{ " Description: function! FB_OpenFileBrowser(dir) if !isdirectory(a:dir) return endif if exists('s:FB_BufferNumber') if bufwinnr(s:FB_BufferNumber) != -1 execute bufwinnr(s:FB_BufferNumber).' wincmd w' return endif execute 'aboveleft split #'.s:FB_BufferNumber else aboveleft split __Choose_File__ let s:FB_BufferNumber = bufnr('%') endif call FB_DisplayFiles(a:dir) endfunction " }}} " FB_DisplayFiles: displays the files in a given directory {{{ " Description: " Call this function only when the cursor is in a temporary buffer function! FB_DisplayFiles(dir) if !isdirectory(a:dir) return endif call s:FB_SetSilentSettings() " make this a "scratch" buffer call s:FB_SetScratchSettings() let allowRegexp = s:FB_GetVar('FB_AllowRegexp', '') let rejectRegexp = s:FB_GetVar('FB_RejectRegexp', '') " change to the directory to make processing simpler. execute "lcd ".a:dir " delete everything in the buffer. " IMPORTANT: we need to be in a scratch buffer 0,$ d_ let allFilenames = glob('*') let dispFiles = "" let subDirs = "../\n" let i = 1 while 1 let filename = s:FB_Strntok(allFilenames, "\n", i) if filename == '' break endif if isdirectory(filename) let subDirs = subDirs.filename."/\n" else if allowRegexp != '' && filename !~ allowRegexp elseif rejectRegexp != '' && filename =~ rejectRegexp else let dispFiles = dispFiles.filename."\n" endif endif let i = i + 1 endwhile 0put!=dispFiles 0put!=subDirs " delte the last empty line resulting from the put $ d_ call s:FB_SetHighlighting() call s:FB_DisplayHelp() call s:FB_SetMaps() " goto the first file/directory 0 call search('^"=', 'w') normal! j:<bs> set nomodified nomodifiable call s:FB_ResetSilentSettings() endfunction " }}} " FB_SetVar: sets script local variables from outside this script {{{ " Description: function! FB_SetVar(varname, value) let s:{a:varname} = a:value endfunction " }}} " FB_SetHighlighting: sets syntax highlighting for the buffer {{{ " Description: " Origin: from explorer.vim in vim function! <SID>FB_SetHighlighting() " Set up syntax highlighting " Something wrong with the evaluation of the conditional though... if has("syntax") && exists("g:syntax_on") && !has("syntax_items") syn match browseSynopsis "^\"[ -].*" syn match browseDirectory "[^\"].*/ " syn match browseDirectory "[^\"].*/$" syn match browseCurDir "^\"= .*$" syn match browseSortBy "^\" Sorted by .*$" contains=browseSuffixInfo syn match browseSuffixInfo "(.*)$" contained syn match browseFilter "^\" Not Showing:.*$" syn match browseFiletime "«\d\+$" "hi def link browseSynopsis PreProc hi def link browseSynopsis Special hi def link browseDirectory Directory hi def link browseCurDir Statement hi def link browseSortBy String hi def link browseSuffixInfo Type hi def link browseFilter String hi def link browseFiletime Ignore hi def link browseSuffixes Type endif endfunction " }}} " FB_SetMaps: sets buffer local maps {{{ " Description: function! <SID>FB_SetMaps() nnoremap <buffer> <silent> q :bdelete<cr> nnoremap <buffer> <silent> C :call FB_DisplayFiles(getcwd())<CR> nnoremap <buffer> <silent> <esc> :bdelete<cr> nnoremap <buffer> <silent> <CR> :call <SID>FB_EditEntry()<CR> nnoremap <buffer> <silent> ? :call <SID>FB_ToggleHelp()<CR> " lock the user in this window nnoremap <buffer> <C-w> <nop> endfunction " }}} " FB_SetSilentSettings: some settings which make things silent {{{ " Description: " Origin: from explorer.vim distributed with vim. function! <SID>FB_SetSilentSettings() let s:save_report=&report let s:save_showcmd = &sc set report=10000 noshowcmd endfunction " FB_ResetSilentSettings: reset settings set by FB_SetSilentSettings " Description: function! <SID>FB_ResetSilentSettings() let &report=s:save_report let &showcmd = s:save_showcmd endfunction " }}} " FB_SetScratchSettings: makes the present buffer a scratch buffer {{{ " Description: function! <SID>FB_SetScratchSettings() " Turn off the swapfile, set the buffer type so that it won't get " written, and so that it will get deleted when it gets hidden. setlocal noreadonly modifiable setlocal noswapfile setlocal buftype=nowrite setlocal bufhidden=delete " Don't wrap around long lines setlocal nowrap endfunction " }}} " FB_ToggleHelp: toggles verbosity of help {{{ " Description: function! <SID>FB_ToggleHelp() let s:FB_VerboseHelp = 1 - s:FB_GetVar('FB_VerboseHelp', 0) call FB_DisplayFiles('.') endfunction " }}} " FB_DisplayHelp: displays a helpful header {{{ " Description: function! <SID>FB_DisplayHelp() let verboseHelp = s:FB_GetVar('FB_VerboseHelp', 0) if verboseHelp let txt = \ "\" <cr>: on file, choose the file and quit\n" \ ."\" on dir, enter directory\n" \ ."\" q/<esc>: quit without choosing\n" \ ."\" C: change directory to getcwd()\n" \ ."\" ?: toggle help verbosity\n" \ ."\"= ".getcwd() else let txt = "\" ?: toggle help verbosity\n" \ ."\"= ".getcwd() endif 0put!=txt endfunction " }}} " Handles various actions in the file-browser " FB_EditEntry: handles the user pressing <enter> on a line {{{ " Description: function! <SID>FB_EditEntry() let line = getline('.') if isdirectory(line) call FB_DisplayFiles(line) endif " If the user has a call back function defined on choosing a file, handle " it. let cbf = s:FB_GetVar('FB_CallBackFunction', '') if cbf != '' && line !~ '^" ' && filereadable(line) let fname = fnamemodify(line, ':p') bdelete let arguments = s:FB_GetVar('FB_CallBackFunctionArgs', '') if arguments != '' let arguments = ','.arguments endif call Tex_Debug('arguments = '.arguments, 'fb') call Tex_Debug("call ".cbf."('".fname."'".arguments.')', 'fb') exec "call ".cbf."('".fname."'".arguments.')' endif endfunction " }}} " FB_Strntok (string, tok, n) {{{ " extract the n^th token from s seperated by tok. " example: FB_Strntok('1,23,3', ',', 2) = 23 fun! <SID>FB_Strntok(s, tok, n) return matchstr( a:s.a:tok[0], '\v(\zs([^'.a:tok.']*)\ze['.a:tok.']){'.a:n.'}') endfun " }}} " FB_GetVar: gets the most local value of a variable {{{ function! <SID>FB_GetVar(name, default) if exists('s:'.a:name) return s:{a:name} elseif exists('w:'.a:name) return w:{a:name} elseif exists('b:'.a:name) return b:{a:name} elseif exists('g:'.a:name) return g:{a:name} else return a:default endif endfunction " }}} " vim:fdm=marker:ff=unix:noet:ts=4:sw=4:nowrap |
From: <sri...@us...> - 2003-08-22 22:10:01
|
Update of /cvsroot/vim-latex/vimfiles/doc In directory sc8-pr-cvs1:/tmp/cvs-serv25637 Modified Files: latex-suite.xml latex-suite.txt Log Message: - added the bit about how to over-ride macros set by latex-suite. - the latest version of db2vim also folds up subsections within sections. Index: latex-suite.xml =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/doc/latex-suite.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** latex-suite.xml 27 Jul 2003 00:46:53 -0000 1.11 --- latex-suite.xml 22 Aug 2003 22:09:58 -0000 1.12 *************** *** 179,182 **** --- 179,215 ---- </para> </note> + <note id="overriding-macros"> + <title>Over-riding &ls; Macros</title> + <para> + If you wish to change these macros from their default values, for + example, if you wish to change <literal>`w</literal> to expand to + <literal>\omega</literal> instead of its default expansion to + <literal>\wedge</literal>, you should use the <literal>IMAP</literal> + function as described in the <link linkend="ls-new-macros">Using + IMAP()</link> section. + </para> + <para> + An important thing to note is that if you wish to over-ride macros + created by &ls; rather than merely create new macros, you should place + the <literal>IMAP()</literal> calls in a script which gets sourced + after the files in &ls;. A good place typically is as a file-type + plugin file in the + <literal>~/.vim/after/ftplugin/</literal> directory. (Use + <literal>~/vimfiles</literal> if you are using + <literal>WINDOWS</literal>). For example to over-ride + <literal>`w</literal> to <literal>\omega</literal> instead of + <literal>\wedge</literal>, place the following line in (say) + <literal>~/.vim/after/ftplugin/tex_macros.vim</literal>: + <programlisting>call IMAP('`w', '\omega', 'tex')</programlisting> + </para> + <note> + <para> + It is important to use a file-name which will get sourced on a + <literal>FileType</literal> event. Therefore you must use a file-name + which conforms to the standards as described in + <literal>|ftplugin-name|</literal>. + </para> + </note> + </note> <para> The following sections describe the various editing macros provided *************** *** 1716,1722 **** <literal>.latexmain</literal> file can also be present in a directory directly above the directory containing the present file. &ls; will ! scan upwards from the directory containing the present file and stop ! when it finds a <literal>.latexmain</literal> file, which points to the ! master file for the present file. </para> <note> --- 1749,1755 ---- <literal>.latexmain</literal> file can also be present in a directory directly above the directory containing the present file. &ls; will ! scan upwards recursively from the directory containing the present file ! and stop when it finds a <literal>.latexmain</literal> file, which ! points to the master file for the present file. </para> <note> Index: latex-suite.txt =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/doc/latex-suite.txt,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** latex-suite.txt 27 Jul 2003 00:46:53 -0000 1.34 --- latex-suite.txt 22 Aug 2003 22:09:58 -0000 1.35 *************** *** 12,17 **** macros to speed up editing LaTeX documents to functions for forward searching .dvi documents. Latex-suite has been possible because of the contributions of ! many people. Please see latex-suite-credits [|latex-suite-credits|] for a list ! of people who have helped. Latex-suite is released under the Vim charityware license. For license and --- 12,17 ---- macros to speed up editing LaTeX documents to functions for forward searching .dvi documents. Latex-suite has been possible because of the contributions of ! many people. Please see latex-suite-credits [|ls_a_do|] for a list of people who [...2571 lines suppressed...] ================================================================================ + About this file + This file was created automatically from its XML variant using db2vim. db2vim is + a python script which understands a very limited subset of the Docbook XML 4.2 + DTD and outputs a plain text file in vim help format. + + db2vim can be obtained via anonymous CVS from sourceforge.net. Use + + cvs -d:pserver:ano...@cv...:/cvsroot/vim-latex co db2vim + + Or you can visit the web-interface to sourceforge CVS at: + http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/vim-latex/db2vim/ + + The following modelines should nicely fold up this help manual. + + vim:ft=help:fdm=expr:nowrap + vim:foldexpr=getline(v\:lnum-1)=~'-\\{80}'?'>2'\:getline(v\:lnum-1)=~'=\\{80}'?'>1'\:getline(v\:lnum)=~'=\\{80}'?'0'\:getline(v\:lnum)=~'-\\{80}'?'1'\:'=' + vim:foldtext=substitute(v\:folddashes.substitute(getline(v\:foldstart),'\\s*\\*.*',"",""),'^--','\ \ \ \ \ \ ','') + ================================================================================ |
From: <sri...@us...> - 2003-08-11 01:08:39
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv14589 Modified Files: ChangeLog Log Message: Index: ChangeLog =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/ChangeLog,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ChangeLog 17 Jul 2003 11:19:14 -0000 1.9 --- ChangeLog 11 Aug 2003 01:08:37 -0000 1.10 *************** *** 1,208 **** After 6 Jun 2003 17 Jul 2003 ! Features ! * packages.vim: ! Add custom completion to TPackage command. ! It works only for Vim 6.2 or later. (MM) ! Changes ! * main.vim: ! make Tex_GetMainFile() recursively search upwards for a *.latexmain ! file. (SA) ! * texmenuconf.vim: ! Peter Heslin (maintaining the cream port of latex-suite says that the ! Windows menu from cream appears in the middle of the latex-suite ! menus). A new variable g:Tex_MainMenuLocation is used to find the ! location of the latex-suite menus. (SA) ! * packages/polski: ! Update to cover version 1.3 of package. (MM) ! Bugfixes ! * main.vim: ! Bug: If g:Tex_SmartQuoteOpen/Close contain the '~' character (french quotes ! are "«~" and "~»", then we get an error in quotations (Mathieu ! CLABAUT). ! Solution: escape ~ in the search() function (Mathieu CLABAUT). ! * compiler.vim: ! Bug: Sometimes moving up and down in the error list window causes a regexp ! error. ! Solution: properly escape backslashes in the regexp. (SA) 28 Jun 2003 ! Features ! * latex-suite.txt: ! vastly improved the latex-suite documentation. Now all documentation ! is first written in docbook xml and then converted into html and ! vim-help using saxon and db2vim respectively. ! * bib_latexSuite.vim: ! A new ftplugin file to trigger the bibtex mappings. (SA) ! Changes ! * compiler.vim: ! change the behavior of the part compilation and viewing as documented. ! Remove the "part view" feature because it does not make sense. (SA) ! * packages.vim: ! change the behavior of finding custom packages. Use vim's native :find ! command instead of some complicated parsing of $TEXINPUTS. Introduce a ! new g:Tex_TEXINPUTS variable which should be set in the same format as ! vim's 'path' setting. (SA) ! * texviewer.vim: ! Change the way <F9> works for \cite completion. Change the way ! g:Tex_BIBINPUTS variable has to be set. The new \cite completion ! method is described in detail in the manual. ! * envmacros.vim: ! changed ETR to insert a more complete template using Tex_SpecialMacros ! (Mathieu CLABAUT) ! Bugfixes ! * packages.vim: ! Bug: When a \usepackage{} line is inside a fold, then we go into an ! infinite loop. (Lin-bo Zhang) ! Solution: A temporary hack of first opening up all folds before scanning ! and then closing them. This needs to be robustified in the future ! using mkview.vim (SA) ! * envmacros.vim: ! Bug: <F5> did not work for inserting environments which latex-suite ! does not recognize. (bug introduced in version 1.32) ! Solution: make <F5> insert at least a minimal environment template if ! all other methods fail. (SA) ! * texviewer.vim: ! Bug: Pressing <F9> at the end of a line like ! This is a \ref{eqn:something} and this is a comp ! would cause errors. ! Why: The substitute() command returns the original string if the pattern ! does not match causing us to wrongly infer a match. ! Fix: Therefore first check if there is a match. ! Bug: Once we complete an equation, we can never complete a word. ! Why: s:type is never unlet ! Fix: unlet! s:type if there is no match on current line to any known ! command. ! Bug: Pressing <CR> during word completion does not take us to the location ! of the match, as claimed. ! Why: <CR> does "cc <num> | pclose! | cclose!". Because the preview window ! with the match is open, therefore cc will take us to the match in ! the preview window, after which pclose closes it up! ! Fix: Do 'pclose! cc <num> | cclose' instead... ! * compiler.vim: ! Bug: If we used :TTarget ps, then the compiler would be called as: ! dvips -o file.tex.ps file.tex.dvi ! instead of ! dvips -o file.ps file.dvi ! Why: In a recent change, we made RunLaTeX() use filenames with extension. ! However, some compilation rules might require filenames w/o extensions ! (such as Tex_CompileRule_ps which is 'dvips -o $*.ps $*.dvi') ! Fix: Try to guess if the &makeprg requires files w/o extensions by seeing ! if it matches '\$\*\.\w\+'. If so, use file-name w/o extension. ! Otherwise, retain extension in 'make '.fname ! * imaps.vim: ! Bug: IMAP_Jumpfunc() and VEnclose() do not work with &selection = ! 'exclusive' (Jannie Hofmeyr, Pierre Antoine Champin) ! Fix: Select one more character in 'exclusive' mode. (suggested by Pierre ! Antoine Champin). ! * texviewer.vim: ! Bug: On windows gvim +cygwin, \cite completion does not work when the bib ! file is in a completeley different location. ! Cause: gvim calls grep as "grep -nH @.*{ /path/to/file" ! which does not work because grep thinks / corresponds to something ! like c:/cygwin, so it looks for the file in the wrong place. ! Fix: Always lcd to the current directory of the bib file being searched. ! This avoids any path issues. 13 Jun 2003 ! Features ! * remoteOpen.vim: ! Add a command :RemoteOpen which is to be used in applications such as ! YAP to make vim use the same session to open files. (SA) ! ! Bugfixes ! * texviewer.vim: ! Problem: <F9> did not work in standard vim + cygwin combination. ! Solution: Use single quotes instead of double-quotes when issuing ! shell commands. (SA) ! * texviewer.vim: ! Problem: <F9> did not work for \includegraphics[0.8\columnwidth]{} ! because it would confuse \columnwidth for a command instead ! of an option. ! Solution: improve regexp for extracting command from a line. (SA) ! * envmacros.vim: ! Problem: the maps in envmacros.vim got applied only to the first file ! which latex-suite sees. ! Solution: fix a typo in the autocommand line. (SA) ! * compiler.vim,wizardfuncs.vim: ! Problem: the log preview window did not appear during part ! compilation. ! Solution: rearranged code in the files so the main filename was ! defined even for part compilation. (SA) ! * texviewer.vim: ! Problem: <F9> only works for the first file. ! Solution: call the function to set the maps every time. (SA) ! * compiler.vim: ! Problem: sometimes, <F9> would try to search for completions in /*.tex ! and would therefore fail. ! Solution: use expand('%:p:h') instead of expand('%;h') to calculate ! directory because the latter can sometimes evaluate to ''. (SA) ! * texviewer.vim: ! Problem: 'scrolloff' remains at 1000 even after <F9> returns (Jakub ! Turski) ! Solution: reset 'scrolloff' before quitting any of the windows created ! during searching. ! * packages.vim: ! Problem: A spurious '{' is sometimes inserted into the search history. ! ... (A. S. Budden, Mpiktas) ! Solution: call histdel once at the end of Tex_pack_all. - After 8 May 2003 ! Features ! * texviewer.vim: ! Look for bibfiles in $BIBINPUTS env variable (Soren Debois) ! * envmacros.vim: ! Check in package variables for templates for environments inserted ! from line with <F5> (MM) ! * packages/amsmath: ! Templates for alignat and alignat* envs in amsmath package file (MM) ! * compiler.vim: ! Added support for regular viewing and forward searching for kdvi (KDE ! viewer of .dvi files) (MM) ! * compiler.vim: ! Show default target enclosed in [] after calling :TTarget, :TCTarget ! or :TVTarget. Allow no argument for :TTarget. ! * mathmacros.vim, main.vim, texrc, latex-suite.txt: ! Added utf-8 menus for math (MM) ! * ChangeLog: ! Add ChangeLog file in ftplugin/latex-suite directory (MM) ! * wizardfuncs.vim, latex-suite.txt: ! Tshortcuts - new command show various shortcuts (MM, SA) ! * latex-suite.txt: ! More cross-references with main Vim help, corrected mispells (MM) ! * texmenuconf.vim: ! Show value of <mapleader> in General menu instead of hardcoded \ (it ! caused confusion) (MM, SA) ! * texmenuconf.vim, mathmacros.vim: ! Add accels for for Suite, Elements end Environments menus. ! Changed accel in Math (Animesh Nerurkar) ! Bugfixes ! * compiler.vim: ! Problem: Compile file with current file expansion, not always .tex ! file (Animesh N Nerurkar) ! Solution: When looking for file to compile don't remove extension (if ! *.latexmain doesn't exist) (MM) ! * texviewer.vim: ! Problem: :TLook doesn't work (Animesh N Nerurkar) ! Solution: Check if s:type exists in UpdateViewerWindow (MM) ! * compiler.vim: ! Problem: Text is messed after calling external command in terminal ! version of Vim (Jess Thrysoee) ! Solution: Add redraw! after calling compilers and viewers (partial ! implementation of JT patch, MM) ! * texrc: ! Problem: Compiling pdf didn't succed because of double file extension, ! eg. myfile.tex.tex (Animesh N Nerurkar) ! Solution: Remove hardcoded .tex in CompilerRule_pdf. NOTE: Update of ! personal texrc is required! (Animesh N Nerurkar) --- 1,229 ---- After 6 Jun 2003 + 10 Aug 2003 + Changes + * texrc, compiler.vim: + Make g:Tex_IgnoredWarnings use "\n" as the pattern seperator instead + of the inverted exclamation mark to avoid i18n issues. (Pan Shizhu, + SA) + * main.vim: + Use :runtime instead of :source in order to avoid problems when + latex-suite is installed in places other than ~/vimfiles or ~/.vim. + (Chris Greenwood, SA) + + Bugfixes + * texproject.vim, main.vim: + Escape ' ' in a couple of places when defining filenames and dirnames + in order to avoid problems while issuing :cd etc. (Diego Carafini) + * texmenuconf.vim: + A couple of bug-fixes in the main latex-suite menu (SA) + * latex-suite.txt: + Fixed documentation about folding (SA) + 17 Jul 2003 ! Features ! * packages.vim: ! Add custom completion to TPackage command. ! It works only for Vim 6.2 or later. (MM) ! Changes ! * main.vim: ! make Tex_GetMainFile() recursively search upwards for a *.latexmain ! file. (SA) ! * texmenuconf.vim: ! Peter Heslin (maintaining the cream port of latex-suite says that the ! Windows menu from cream appears in the middle of the latex-suite ! menus). A new variable g:Tex_MainMenuLocation is used to find the ! location of the latex-suite menus. (SA) ! * packages/polski: ! Update to cover version 1.3 of package. (MM) ! Bugfixes ! * main.vim: ! Bug: If g:Tex_SmartQuoteOpen/Close contain the '~' character (french quotes ! are "«~" and "~»", then we get an error in quotations (Mathieu ! CLABAUT). ! Solution: escape ~ in the search() function (Mathieu CLABAUT). ! * compiler.vim: ! Bug: Sometimes moving up and down in the error list window causes a regexp ! error. ! Solution: properly escape backslashes in the regexp. (SA) 28 Jun 2003 ! Features ! * latex-suite.txt: ! vastly improved the latex-suite documentation. Now all documentation ! is first written in docbook xml and then converted into html and ! vim-help using saxon and db2vim respectively. ! * bib_latexSuite.vim: ! A new ftplugin file to trigger the bibtex mappings. (SA) ! Changes ! * compiler.vim: ! change the behavior of the part compilation and viewing as documented. ! Remove the "part view" feature because it does not make sense. (SA) ! * packages.vim: ! change the behavior of finding custom packages. Use vim's native :find ! command instead of some complicated parsing of $TEXINPUTS. Introduce a ! new g:Tex_TEXINPUTS variable which should be set in the same format as ! vim's 'path' setting. (SA) ! * texviewer.vim: ! Change the way <F9> works for \cite completion. Change the way ! g:Tex_BIBINPUTS variable has to be set. The new \cite completion ! method is described in detail in the manual. ! * envmacros.vim: ! changed ETR to insert a more complete template using Tex_SpecialMacros ! (Mathieu CLABAUT) ! Bugfixes ! * packages.vim: ! Bug: When a \usepackage{} line is inside a fold, then we go into an ! infinite loop. (Lin-bo Zhang) ! Solution: A temporary hack of first opening up all folds before scanning ! and then closing them. This needs to be robustified in the future ! using mkview.vim (SA) ! * envmacros.vim: ! Bug: <F5> did not work for inserting environments which latex-suite ! does not recognize. (bug introduced in version 1.32) ! Solution: make <F5> insert at least a minimal environment template if ! all other methods fail. (SA) ! * texviewer.vim: ! Bug: Pressing <F9> at the end of a line like ! This is a \ref{eqn:something} and this is a comp ! would cause errors. ! Why: The substitute() command returns the original string if the pattern ! does not match causing us to wrongly infer a match. ! Fix: Therefore first check if there is a match. ! Bug: Once we complete an equation, we can never complete a word. ! Why: s:type is never unlet ! Fix: unlet! s:type if there is no match on current line to any known ! command. ! Bug: Pressing <CR> during word completion does not take us to the location ! of the match, as claimed. ! Why: <CR> does "cc <num> | pclose! | cclose!". Because the preview window ! with the match is open, therefore cc will take us to the match in ! the preview window, after which pclose closes it up! ! Fix: Do 'pclose! cc <num> | cclose' instead... ! * compiler.vim: ! Bug: If we used :TTarget ps, then the compiler would be called as: ! dvips -o file.tex.ps file.tex.dvi ! instead of ! dvips -o file.ps file.dvi ! Why: In a recent change, we made RunLaTeX() use filenames with extension. ! However, some compilation rules might require filenames w/o extensions ! (such as Tex_CompileRule_ps which is 'dvips -o $*.ps $*.dvi') ! Fix: Try to guess if the &makeprg requires files w/o extensions by seeing ! if it matches '\$\*\.\w\+'. If so, use file-name w/o extension. ! Otherwise, retain extension in 'make '.fname ! * imaps.vim: ! Bug: IMAP_Jumpfunc() and VEnclose() do not work with &selection = ! 'exclusive' (Jannie Hofmeyr, Pierre Antoine Champin) ! Fix: Select one more character in 'exclusive' mode. (suggested by Pierre ! Antoine Champin). ! * texviewer.vim: ! Bug: On windows gvim +cygwin, \cite completion does not work when the bib ! file is in a completeley different location. ! Cause: gvim calls grep as "grep -nH @.*{ /path/to/file" ! which does not work because grep thinks / corresponds to something ! like c:/cygwin, so it looks for the file in the wrong place. ! Fix: Always lcd to the current directory of the bib file being searched. ! This avoids any path issues. 13 Jun 2003 ! Features ! * remoteOpen.vim: ! Add a command :RemoteOpen which is to be used in applications such as ! YAP to make vim use the same session to open files. (SA) ! ! Bugfixes ! * texviewer.vim: ! Problem: <F9> did not work in standard vim + cygwin combination. ! Solution: Use single quotes instead of double-quotes when issuing ! shell commands. (SA) ! * texviewer.vim: ! Problem: <F9> did not work for \includegraphics[0.8\columnwidth]{} ! because it would confuse \columnwidth for a command instead ! of an option. ! Solution: improve regexp for extracting command from a line. (SA) ! * envmacros.vim: ! Problem: the maps in envmacros.vim got applied only to the first file ! which latex-suite sees. ! Solution: fix a typo in the autocommand line. (SA) ! * compiler.vim,wizardfuncs.vim: ! Problem: the log preview window did not appear during part ! compilation. ! Solution: rearranged code in the files so the main filename was ! defined even for part compilation. (SA) ! * texviewer.vim: ! Problem: <F9> only works for the first file. ! Solution: call the function to set the maps every time. (SA) ! * compiler.vim: ! Problem: sometimes, <F9> would try to search for completions in /*.tex ! and would therefore fail. ! Solution: use expand('%:p:h') instead of expand('%;h') to calculate ! directory because the latter can sometimes evaluate to ''. (SA) ! * texviewer.vim: ! Problem: 'scrolloff' remains at 1000 even after <F9> returns (Jakub ! Turski) ! Solution: reset 'scrolloff' before quitting any of the windows created ! during searching. ! * packages.vim: ! Problem: A spurious '{' is sometimes inserted into the search history. ! ... (A. S. Budden, Mpiktas) ! Solution: call histdel once at the end of Tex_pack_all. ! After 8 May 2003 ! Features ! * texviewer.vim: ! Look for bibfiles in $BIBINPUTS env variable (Soren Debois) ! * envmacros.vim: ! Check in package variables for templates for environments inserted ! from line with <F5> (MM) ! * packages/amsmath: ! Templates for alignat and alignat* envs in amsmath package file (MM) ! * compiler.vim: ! Added support for regular viewing and forward searching for kdvi (KDE ! viewer of .dvi files) (MM) ! * compiler.vim: ! Show default target enclosed in [] after calling :TTarget, :TCTarget ! or :TVTarget. Allow no argument for :TTarget. ! * mathmacros.vim, main.vim, texrc, latex-suite.txt: ! Added utf-8 menus for math (MM) ! * ChangeLog: ! Add ChangeLog file in ftplugin/latex-suite directory (MM) ! * wizardfuncs.vim, latex-suite.txt: ! Tshortcuts - new command show various shortcuts (MM, SA) ! * latex-suite.txt: ! More cross-references with main Vim help, corrected mispells (MM) ! * texmenuconf.vim: ! Show value of <mapleader> in General menu instead of hardcoded \ (it ! caused confusion) (MM, SA) ! * texmenuconf.vim, mathmacros.vim: ! Add accels for for Suite, Elements end Environments menus. ! Changed accel in Math (Animesh Nerurkar) ! Bugfixes ! * compiler.vim: ! Problem: Compile file with current file expansion, not always .tex ! file (Animesh N Nerurkar) ! Solution: When looking for file to compile don't remove extension (if ! *.latexmain doesn't exist) (MM) ! * texviewer.vim: ! Problem: :TLook doesn't work (Animesh N Nerurkar) ! Solution: Check if s:type exists in UpdateViewerWindow (MM) ! * compiler.vim: ! Problem: Text is messed after calling external command in terminal ! version of Vim (Jess Thrysoee) ! Solution: Add redraw! after calling compilers and viewers (partial ! implementation of JT patch, MM) ! * texrc: ! Problem: Compiling pdf didn't succed because of double file extension, ! eg. myfile.tex.tex (Animesh N Nerurkar) ! Solution: Remove hardcoded .tex in CompilerRule_pdf. NOTE: Update of ! personal texrc is required! (Animesh N Nerurkar) + vim: et:sts=4:tw=78 |
From: <mi...@us...> - 2003-08-04 20:18:56
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv5996 Modified Files: packages.vim Log Message: Removing variant of Tex_CompletePackageName. It doesn't work because of bug in Vim and this bug won't be fixed soon. Index: packages.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages.vim,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** packages.vim 15 Jul 2003 21:33:23 -0000 1.38 --- packages.vim 4 Aug 2003 20:18:53 -0000 1.39 *************** *** 36,43 **** let packnames = substitute(packnames,'^\|,[^,]*/',',','g') let packnames = substitute(packnames,',','\n','g') - "let pwd = getcwd() - "exe 'lcd '.s:path.'/packages' - "let packnames = glob('*') - "exe 'lcd '. pwd return packnames endfunction --- 36,39 ---- |
From: <sri...@us...> - 2003-07-27 00:46:57
|
Update of /cvsroot/vim-latex/vimfiles/doc In directory sc8-pr-cvs1:/tmp/cvs-serv13740a Modified Files: latex-suite.xml latex-suite.txt Log Message: Bug in description of folding... Index: latex-suite.xml =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/doc/latex-suite.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** latex-suite.xml 17 Jul 2003 07:25:49 -0000 1.10 --- latex-suite.xml 27 Jul 2003 00:46:53 -0000 1.11 *************** *** 2024,2038 **** <entry><literal>endoff</literal></entry> <entry> ! like <literal>startoff</literal>, but gives the offset of the actual fold end from ! the line satisfying <literal>endpat</literal>. ! <literal>startoff</literal> and <literal>endoff</literal> are necessary when the folding region does ! not have a specific end pattern corresponding to a start ! pattern. for example in latex, ! <literal>\begin{section}</literal> ! defines the beginning of a section, but its not necessary to ! have a corresponding ! <literal>\end{section}</literal> ! the section is assumed to end 1 line <emphasis>before</emphasis> another section ! starts. </entry> </row> --- 2024,2036 ---- <entry><literal>endoff</literal></entry> <entry> ! like <literal>startoff</literal>, but gives the offset of the ! actual fold end from the line satisfying <literal>endpat</literal>. ! <literal>startoff</literal> and <literal>endoff</literal> are ! necessary when the folding region does not have a specific end ! pattern corresponding to a start pattern. for example in &latex;, ! <literal>\section{Section Name}</literal> defines the beginning of ! a section, but there is no command which specifically ends a ! section. Thus a <literal>\section</literal> is assumed to end 1 ! line <emphasis>before</emphasis> another section starts. </entry> </row> Index: latex-suite.txt =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/doc/latex-suite.txt,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** latex-suite.txt 17 Jul 2003 07:25:49 -0000 1.33 --- latex-suite.txt 27 Jul 2003 00:46:53 -0000 1.34 *************** *** 12,17 **** macros to speed up editing LaTeX documents to functions for forward searching .dvi documents. Latex-suite has been possible because of the contributions of ! many people. Please see latex-suite-credits [|ls_a_do|] for a list of people who ! have helped. Latex-suite is released under the Vim charityware license. For license and --- 12,17 ---- macros to speed up editing LaTeX documents to functions for forward searching .dvi documents. Latex-suite has been possible because of the contributions of ! many people. Please see latex-suite-credits [|latex-suite-credits|] for a list [...2531 lines suppressed...] - http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/vim-latex/db2vim/ - - The following modelines should nicely fold up this help manual. - - vim:ft=help:fdm=expr:nowrap - vim:foldexpr=getline(v\:lnum-1)=~'-\\{80}'?'>2'\:getline(v\:lnum-1)=~'=\\{80}'?'>1'\:getline(v\:lnum)=~'=\\{80}'?'0'\:getline(v\:lnum)=~'-\\{80}'?'1'\:'=' - vim:foldtext=substitute(v\:folddashes.substitute(getline(v\:foldstart),'\\s*\\*.*',"",""),'^--','\ \ \ \ \ \ ','') - ================================================================================ --- 2721,2731 ---- ================================================================================ ! Vim folding ! The following modelines should nicely fold up the help manual. + vim:ft=help:fdm=expr + vim:foldexpr=getline(v\:lnum-1)=~"=\\\\{80,}"?"a1"\:(getline(v\:lnum+1)=~"=\\\\{80,}"?"s1"\:"=") + vim:foldtext=v\:folddashes.substitute(getline(v\:foldstart),"\\\\s*\\\\*.*","","") ================================================================================ |
From: <sri...@us...> - 2003-07-26 19:52:21
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv30292 Modified Files: texmenuconf.vim Log Message: Bug-fix: Some menu items did not work Index: texmenuconf.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/texmenuconf.vim,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** texmenuconf.vim 19 Jul 2003 07:03:08 -0000 1.18 --- texmenuconf.vim 26 Jul 2003 19:52:18 -0000 1.19 *************** *** 57,61 **** \' :silent! call RunLaTeX()<CR>' exec 'anoremenu '.g:Tex_MainMenuLocation.'.40 '.s:mainmenuname.'&View<tab>'.s:mapleader.'lv'. ! \' :silent! call ViewLaTeX("all")<CR>' exec 'anoremenu '.g:Tex_MainMenuLocation.'.50 '.s:mainmenuname.'&Search<tab>'.s:mapleader.'ls'. \' :silent! call ForwardSearchLaTeX()<CR>' --- 57,61 ---- \' :silent! call RunLaTeX()<CR>' exec 'anoremenu '.g:Tex_MainMenuLocation.'.40 '.s:mainmenuname.'&View<tab>'.s:mapleader.'lv'. ! \' :silent! call ViewLaTeX()<CR>' exec 'anoremenu '.g:Tex_MainMenuLocation.'.50 '.s:mainmenuname.'&Search<tab>'.s:mapleader.'ls'. \' :silent! call ForwardSearchLaTeX()<CR>' *************** *** 67,73 **** \' :call SetTeXCompilerTarget("View", "")<CR>' exec 'anoremenu '.g:Tex_MainMenuLocation.'.90 '.s:mainmenuname.'Set\ &Ignore\ Level<tab>:TCLevel'. ! \' :TCLevel NONE<CR>' ! exec 'inoremenu '.g:Tex_MainMenuLocation.'.100 '.s:mainmenuname.'C&omplete\ Ref/Cite'. ! \' <Esc>:call Tex_viewer("default","text")<CR>' exec 'anoremenu '.g:Tex_MainMenuLocation.'.110 '.s:mainmenuname.'-sepsuite1- :' " refreshing folds --- 67,73 ---- \' :call SetTeXCompilerTarget("View", "")<CR>' exec 'anoremenu '.g:Tex_MainMenuLocation.'.90 '.s:mainmenuname.'Set\ &Ignore\ Level<tab>:TCLevel'. ! \' :TCLevel<CR>' ! exec 'imenu '.g:Tex_MainMenuLocation.'.100 '.s:mainmenuname.'C&omplete\ Ref/Cite'. ! \' <Plug>Tex_Completion' exec 'anoremenu '.g:Tex_MainMenuLocation.'.110 '.s:mainmenuname.'-sepsuite1- :' " refreshing folds |
From: <sri...@us...> - 2003-07-26 19:15:58
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv22857 Modified Files: main.vim Log Message: Bug: When latex-suite is packaged as a system wide utility installed in /usr/share/vim/vim61, then the local texrc file in ~/.vim/ftplugin/tex/texrc does not get sourced as claimed in the documentation. (Chris Greenwood) Why: latex-suite tries to source ../tex/texrc from where main.vim resides, which in the case of system wide installations is not ~/.vim/ftplugin/tex/texrc Fix: Just use :runtimepath instead of using s:up_path etc. Index: main.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** main.vim 25 Jul 2003 01:22:27 -0000 1.44 --- main.vim 26 Jul 2003 19:15:55 -0000 1.45 *************** *** 29,36 **** let s:path = expand('<sfile>:p:h') " set up personal defaults. ! let s:up_path = expand('<sfile>:p:h:h') ! if filereadable(s:up_path.'/tex/texrc') ! exe "so ".s:up_path.'/tex/texrc' ! endif " set up global defaults. exe "so ".s:path.'/texrc' --- 29,33 ---- let s:path = expand('<sfile>:p:h') " set up personal defaults. ! runtime ftplugin/tex/texrc " set up global defaults. exe "so ".s:path.'/texrc' |
From: <sri...@us...> - 2003-07-26 19:10:13
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv22514 Modified Files: texrc Log Message: - documentation bug fix about location of local texrc. Index: texrc =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/texrc,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** texrc 24 Jul 2003 03:03:51 -0000 1.32 --- texrc 26 Jul 2003 19:10:10 -0000 1.33 *************** *** 14,23 **** " " You can do one of the following: ! " 1. Copy this file into $VIMFILES/ftplugin/latex-suite/tex/texrc " and edit the values in that file. " $VIMFILES is ~/.vim for UNIX systems and ~/vimfiles for ! " WINDOWS systems. Copying it to some arbitrary location even ! " within some other location in your 'runtimepath' will not ! " work. " " 2. Just set values of each setting individually in your --- 14,21 ---- " " You can do one of the following: ! " 1. Copy this file into $VIMFILES/ftplugin/tex/texrc " and edit the values in that file. " $VIMFILES is ~/.vim for UNIX systems and ~/vimfiles for ! " WINDOWS systems. " " 2. Just set values of each setting individually in your |
From: <sri...@us...> - 2003-07-25 01:22:30
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv13224 Modified Files: main.vim Log Message: make Tex_GetMainFileName return filename with ' ' escaped. Index: main.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** main.vim 17 Jul 2003 07:30:43 -0000 1.43 --- main.vim 25 Jul 2003 01:22:27 -0000 1.44 *************** *** 454,458 **** exe 'cd '.escape(curd, ' ') ! return lheadfile endfunction --- 454,458 ---- exe 'cd '.escape(curd, ' ') ! return escape(lheadfile, ' ') endfunction |
From: <sri...@us...> - 2003-07-25 01:21:29
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv12883 Modified Files: texproject.vim Log Message: escape filename while saving etc (Diego Carafini). Also only source mainfilename if its .latexmain. This change is in anticipation of future changes when Tex_GetMainFileName() will return expand('%:p') when a .latexmain does not exist. In this case, we do not want to source the .tex file... Index: texproject.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/texproject.vim,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** texproject.vim 23 Apr 2003 17:28:31 -0000 1.2 --- texproject.vim 25 Jul 2003 01:21:26 -0000 1.3 *************** *** 26,31 **** exe 'split '.Tex_GetMainFileName(":p") else ! exe 'split '.s:path.'/projecttemplate.vim' ! exe 'saveas '.file.'.latexmain' let g:Tex_ProjectExists = 1 endif --- 26,31 ---- exe 'split '.Tex_GetMainFileName(":p") else ! exe 'split '.escape(s:path.'/projecttemplate.vim', ' ') ! exe 'saveas '.escape(file.'.latexmain', ' ') let g:Tex_ProjectExists = 1 endif *************** *** 64,68 **** " Load project file if exists ! if Tex_GetMainFileName() != '' exe 'source '.Tex_GetMainFileName(":p") let g:Tex_ProjectExists = 1 --- 64,68 ---- " Load project file if exists ! if Tex_GetMainFileName() != '' && Tex_GetMainFileName(':e') == 'latexmain' exe 'source '.Tex_GetMainFileName(":p") let g:Tex_ProjectExists = 1 |