[Vim-latex-cvs] vimfiles/ftplugin/latex-suite packages.vim,1.17,1.18
Brought to you by:
srinathava,
tmaas
From: <sri...@us...> - 2002-12-30 00:16:55
|
Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite In directory sc8-pr-cvs1:/tmp/cvs-serv6236 Modified Files: packages.vim Log Message: Bug: When the command TPackage was used without arguments, then the user couldn't choose a package file. The list would scroll by quickly without waiting for user input and no package would be chosen. Cause: Using a command com! Foo normal! i<C-r>=Foo()<CR> where Foo() asks for user input doesn't seem to work in vim. Solution: Benji suggested that we use something like: com! let ret = Foo() <bar> normal! i<C-r>=ret<CR> This causes the normal! command to not have to get any user input. TODO: There is still a bug in that the command doesn't take the user to insert mode... i.e, the following doesn't work: com! Foo normal! i This command does not take the user to insert mode. However, com! Foo normal! 0v$<C-g> does take the user to select mode... Index: packages.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/packages.vim,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** packages.vim 27 Dec 2002 22:41:11 -0000 1.17 --- packages.vim 30 Dec 2002 00:16:51 -0000 1.18 *************** *** 3,7 **** " Author: Mikolaj Machowski " Created: Tue Apr 23 06:00 PM 2002 PST ! " Last Change: Fri Dec 27 02:00 PM 2002 PST " " Description: handling packages from within vim --- 3,7 ---- " Author: Mikolaj Machowski " Created: Tue Apr 23 06:00 PM 2002 PST ! " Last Change: Sun Dec 29 04:00 PM 2002 PST " " Description: handling packages from within vim *************** *** 18,22 **** let s:menu_div = 20 ! com! -nargs=* TPackage :normal! i<C-r>=Tex_pack_one(<f-args>)<CR> com! -nargs=0 TPackageUpdate :silent! call Tex_pack_updateall() com! -nargs=0 TPackageUpdateAll :silent! call Tex_pack_updateall() --- 18,22 ---- let s:menu_div = 20 ! com! -nargs=* TPackage let s:retVal = Tex_pack_one(<f-args>) <bar> normal! i<C-r>=s:retVal<CR> com! -nargs=0 TPackageUpdate :silent! call Tex_pack_updateall() com! -nargs=0 TPackageUpdateAll :silent! call Tex_pack_updateall() |