Input()/Inputdialog() show repetive information at startup, the following
reproduce the behavior if it's added to $HOME/.vimrc:
------------
if !isdirectory(expand(expand("~/.vim/bundle/vundle/.git/")))
call inputsave()
if input("Setting up vundle, this may take a while, wanna continue?
(y/n): ") == "y"
!git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle
endif
call inputrestore()
endif
-----------
It repeats the string 'Setting up vundle, this may take a while, wanna
continue? (y/n): y' till someone press <CR>
If executed inside a autocmd VimEnter block it works but may be too late
for specific cases
------------
autocmd VimEnter * call InitVundle()
function! InitVundle()
if !isdirectory(expand(expand("~/.vim/bundle/vundle/.git/")))
" call inputsave()
if inputdialog("Setting up vundle, this may take a while, wanna
continue? (y/n): ") == "y"
!git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle
endif
"call inputsave()
endif
endfunction
------------
The following seems to be the only workaround (thx to frogonwheels in #vim
for the tip)
-----------
if !isdirectory(expand(expand("~/.vim/bundle/vundle/.git/")))
call inputsave()
echon "Setting up vundle, this may take a while, wanna continue? (y/n):
"
if nr2char(getchar()) ==? 'y'
!git clone https://github.com/gmarik/vundle ~/.vim/bundle/vundle
endif
call inputrestore()
endif
-----------
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php