Closed rking closed 12 years ago
Define g:vim_addon_manager
dictionary with key 'shell_commands_run_method'
set to 'system'
. Auto-install has nothing to do with vim own feature, it just makes VAM install plugins without prompting. 'system'
method will have problems with commands that contain newlines, but it is very much likely will never happen as the only two places where it can appear are plugin URLs and file and archive names. About URLs I can tell you the following: newlines will be there only if you manually add them there using custom repository source: as a maintainer of VAM-kr and a co-author I can say that either VAM-kr won’t contain such URLs (or I will make all run methods support them, which is unlikely). About second I can tell that I have not seen such filenames anywhere but in tests (POSIX allows them — thus every software working with filesystem must also allow them).
The problem is that Vim doesn't continue scrolling so that you don't miss lines. THat's why its asking for "hit return". Common solutions are using redirect or silent!. Also have a look at s:cmd in utils.vim which could be changed to not use Log. Yes - ist a weekness of VAM. Also grep for 'Unattended Installation". Docs 2.4. If you think this is a RTFM issue only close it. If not reply
Hrm. What am I doing wrong on the first step? I'm getting this:
Plugin: vim-addon-manager-known-repositories
Home page: https://github.com/MarcWeber/vim-addon-manager-known-repositories.git
Source URL: git://github.com/MarcWeber/vim-addon-manager-known-repositories.git (type git)
Target: /home/rking/.vim/vim-addons/vim-addon-manager-known-repositories
Origin: git git://github.com/MarcWeber/vim-addon-manager-known-repositories.git
Install plugin `vim-addon-manager-known-repositories'?
[Y]es, (N)o:
And this is my .vimrc:
call pathogen#infect()
fun! EnsureVamIsOnDisk(vam_install_path)
if !filereadable(a:vam_install_path.'/vim-addon-manager/.git/config')
call mkdir(a:vam_install_path, 'p')
call system(
\'git clone --depth=1 git://github.com/MarcWeber/vim-addon-manager '
\.shellescape(a:vam_install_path, 2).'/vim-addon-manager')
exec 'helptags '.fnameescape(a:vam_install_path.'/vim-addon-manager/doc')
endif
endf
let vam_install_path = expand('$HOME') . '/.vim/vim-addons'
let g:vim_addon_manager = { 'shell_commands_run_method': 'system' }
call EnsureVamIsOnDisk(vam_install_path)
exec 'set runtimepath+='.vam_install_path.'/vim-addon-manager'
Understand the difference pathogen vs VAM. VAM is based on a maintained set of packages which in turn is made up of manually maintained github urls and automatically scraped www.vim.org sources. And that pool of known packages is vim-addon-manager-known-repositories it asks to download. You can replace that pool or disable it. The basic idea is that in most cases referring to plugin by name is what users want. And that pool allows VAM to lookup the source location. Eg see pool_fun in additional-documentation.txt
OK, this works:
let g:vim_addon_manager = {
\'shell_commands_run_method': 'system',
\'auto_install': 1,
\'known_repos_activation_policy': 'never',
\}
Crud. No it doesn't. It doesn't prompt but it does give errors.
OK, for real this time:
let g:vim_addon_manager = {
\'shell_commands_run_method': 'system',
\'auto_install': 1,
\}
@rking I see these errors, but they should not happen. Please file a bug in such cases.
Is there any way to avoid having to hit Enter on initial installs?
I'm doing things like this:
…but I still have to hit Enter repeatedly. I've taken to doing:
On new setups, but it's a bit surprising to have to do after saying, "auto install".
Thanks!