[Vim-latex-cvs] vimfiles/ftplugin/latex-suite main.vim,1.14,1.15
Brought to you by:
srinathava,
tmaas
From: <mi...@us...> - 2002-12-06 23:55:39
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv848 Modified Files: main.vim Log Message: Modification of Tex_ChooseFile() for proper work with choose list. Previously it didn't accept word value because it was calling Tex_Strntok which accepts only digital value. Now it uses Tex_Strntok only if Choice is '\s*\d\+\s*'. In other case it use GetListMatchItem from libList.vim. This is not possible to make different prompt than "Enter Choice:" because this function is called in package, template and macro context. Making it different would require adding additional argument to function. This is not much work but I doubt this is necessary. At the top of the list is information "Choose a macro", "Choose a template", "Choose a package". Index: main.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/main.vim,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** main.vim 6 Dec 2002 09:37:51 -0000 1.14 --- main.vim 6 Dec 2002 23:55:35 -0000 1.15 *************** *** 4,8 **** " Email: sr...@fa... " URL: ! " Last Change: Fri Dec 06 01:00 AM 2002 PST " " Help: --- 4,8 ---- " Email: sr...@fa... " URL: ! " Last Change: sob gru 07 12:00 2002 C " " Help: *************** *** 397,407 **** let filenames = substitute(files, "\\v(^|\n)", "\\=submatch(0).Tex_IncrementNumber(1).' : '", 'g') echo filenames ! let num = input('Enter Choice :') ! if num == '' ! let num = 1 endif - let retval = Tex_Strntok(files, "\n", num) if retval == '' ! let ret = Tex_Strntok(files, "\n", 1) endif return retval --- 397,413 ---- let filenames = substitute(files, "\\v(^|\n)", "\\=submatch(0).Tex_IncrementNumber(1).' : '", 'g') echo filenames ! let choice = input('Enter Choice : ') ! let g:choice = choice ! if choice == '' ! return '' ! endif ! if choice =~ '^\s*\d\+\s*$' ! let retval = Tex_Strntok(files, "\n", choice) ! else ! let filescomma = substitute(files, "\n", ",", "g") ! let retval = GetListMatchItem(filescomma, choice) endif if retval == '' ! return '' endif return retval |