[Vim-latex-cvs] vimfiles/ftplugin/latex-suite packages.vim,1.13,1.14
Brought to you by:
srinathava,
tmaas
From: <mi...@us...> - 2002-12-08 16:52:36
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv7548 Modified Files: packages.vim Log Message: Modification of TPackage command, now it works: :TPackage<cr> use ChooseFile menu :TPackage package<cr> inserts \usepackage[]«»{package}«» depending if package has defined options :TPackage package1 package2 inserts \usepackage{package1} \usepackage{package2} Also added some foolproofness to this command Index: packages.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages.vim,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** packages.vim 6 Dec 2002 23:55:42 -0000 1.13 --- packages.vim 8 Dec 2002 16:52:32 -0000 1.14 *************** *** 3,7 **** " Author: Mikolaj Machowski " Created: Tue Apr 23 06:00 PM 2002 PST ! " Last Change: sob gru 07 12:00 2002 C " " Description: handling packages from within vim --- 3,7 ---- " Author: Mikolaj Machowski " Created: Tue Apr 23 06:00 PM 2002 PST ! " Last Change: nie gru 08 05:00 2002 C " " Description: handling packages from within vim *************** *** 80,83 **** --- 80,84 ---- " }}} " Tex_pack_one: {{{ + " Reads command-line and adds appropriate \usepackage lines function! Tex_pack_one(...) if a:0 == 0 *************** *** 87,90 **** --- 88,96 ---- exe 'cd '.pwd call Tex_pack_check(packname) + return Tex_pack_supp(packname) + elseif a:0 == 1 + if filereadable(s:path.'/packages/'.a:1) + return Tex_pack_supp(a:1) + endif else let i = a:0 *************** *** 92,100 **** while omega <= i exe 'let packname = a:'.omega ! call Tex_pack_check(packname) ! let omega = omega + 1 endwhile endif - return Tex_pack_supp(packname) endfunction " }}} --- 98,108 ---- while omega <= i exe 'let packname = a:'.omega ! if filereadable(s:path.'/packages/'.packname) ! call Tex_pack_check(packname) ! exe 'normal ko\usepackage{'.packname."}\<Esc>" ! let omega = omega + 1 ! endif endwhile endif endfunction " }}} |