Re: [Vim-latex-devel] Some problems with command implementation
Brought to you by:
srinathava,
tmaas
From: Srinath A. <sr...@fa...> - 2002-12-29 23:40:34
|
On Sun, 29 Dec 2002, Benji Fisher wrote: > How about this? Note that I have changed the :if line in Foo() as > well as the command. > > " === > fun! Foo(...) > if a:0 == 0 || a:1 == "" > let name = input('Whats your name?', 'bozo') > else > let name = a:1 > endif > return 'Your name is '.name > endfun > > inoremap <F3> <C-r>=Foo()<CR> > nnoremap <F3> i<C-r>=Foo()<CR> > inoremenu Help.foo <C-r>=Foo()<CR> > nnoremenu Help.foo i<C-r>=Foo()<CR> > > com! -nargs=? FooCom let s:FooVal = Foo(<q-args>) <Bar> normal! i<C-r>=s:FooVal<CR> > " === Hello! This works nicely! Thanks! I shall use this idea in packages.vim, templates.vim and custommacros.vim. BTW, please check the latest version of latex-suite (from CVS) for bugs etc. I want this to be the next stable release before we work on any further enhancements. Thanks, Srinath |