MarcWeber / vim-addon-manager

manage and install vim plugins (including their dependencies) in a sane way. If you have any trouble contact me. Usually I reply within 24 hours
Other
660 stars 59 forks source link

Don't repeatedly ask for known repository addon. #9

Closed talek closed 13 years ago

talek commented 13 years ago

Hi,

My goal is to create a .vimrc configuration file with all plugins I'd like to use so that to be enough just to have this .vimrc around and, if I have to setup a new vim in another environment, vim-addon-manager to fech all of them for me. So far so good. Now, I have this:

" Activate Addons Management
let g:vim_script_manager = { 'auto_install' : 1, 'plugin_sources' : {} }
let g:vim_script_manager.plugin_sources['nerd_commenter'] = {'type': 'git', 'url': 'git://github.com/scrooloose/nerdcommenter.git'}
let g:vim_script_manager.plugin_sources['surround'] = {'type': 'git', 'url': 'git://github.com/tpope/vim-surround.git'}
let g:vim_script_manager.plugin_sources['repeat'] = {'type': 'git', 'url': 'git://github.com/tpope/vim-repeat.git'}
let g:vim_script_manager.plugin_sources['supertab'] = {'type': 'git', 'url': 'git://github.com/ervandew/supertab.git'}
let g:vim_script_manager.plugin_sources['align'] = {'version': '35/41', 'url': 'http://www.vim.org/scripts/download_script.php?src_id=10110', 'vim_version': '7.0', 'date': '2009-03-04', 'vim_script_nr': 294, 'type': 'archive', 'script-type': 'utility', 'archive_name': 'Align.vba.gz', 'author': 'Charles Campbell'}
let g:vim_script_manager.plugin_sources['sqlutil'] = {'version': '4.00', 'url': 'http://www.vim.org/scripts/download_script.php?src_id=13576', 'vim_version': '7.0', 'date': '2010-08-15', 'vim_script_nr': 492, 'type': 'archive', 'script-type': 'utility', 'archive_name': 'sqlutil_400.zip', 'author': 'David Fishburn'}
let g:vim_script_manager.plugin_sources['taglist'] = {'version': '4.5', 'url': 'http://www.vim.org/scripts/download_script.php?src_id=7701', 'vim_version': '6.0', 'date': '2007-09-21', 'vim_script_nr': 273, 'type': 'archive', 'script-type': 'utility', 'archive_name': 'taglist_45.zip', 'author': 'Yegappan Lakshmanan'}
let g:vim_script_manager.plugin_sources['fuzzyfinder'] = {'version': '4.0', 'url': 'http://www.vim.org/scripts/download_script.php?src_id=13908', 'vim_version': '7.2', 'date': '2010-09-24', 'vim_script_nr': 1984, 'type': 'archive', 'script-type': 'utility', 'archive_name': 'vim-fuzzyfinder.zip', 'author': 'Takeshi NISHIDA'}
let g:vim_script_manager.plugin_sources['nerd_tree'] = {'version': '4.1.0', 'url': 'http://www.vim.org/scripts/download_script.php?src_id=11834', 'vim_version': '7.0', 'date': '2009-12-01', 'vim_script_nr': 1658, 'type': 'archive', 'script-type': 'utility', 'archive_name': 'NERD_tree.zip', 'author': 'Marty Grenfell'}
let g:vim_script_manager.plugin_sources['L9'] = {'version': '1.0', 'url': 'http://www.vim.org/scripts/download_script.php?src_id=13907', 'vim_version': '7.2', 'date': '2010-09-24', 'vim_script_nr': 3252, 'type': 'archive', 'script-type': 'utility', 'archive_name': 'vim-l9.zip', 'author': 'Takeshi NISHIDA'}
let g:vim_script_manager.plugin_sources['bufkill'] = {'version': '1.7', 'url': 'http://www.vim.org/scripts/download_script.php?src_id=13169', 'vim_version': '7.0', 'date': '2010-06-12', 'vim_script_nr': 1147, 'type': 'plugin', 'script-type': 'plugin', 'archive_name': 'bufkill.vim', 'author': 'John Orr'}
let g:vim_script_manager.plugin_sources['xptemplate'] = {'version': '0.4.8-r994', 'url': 'http://www.vim.org/scripts/download_script.php?src_id=13740', 'vim_version': '7.2', 'date': '2010-09-01', 'vim_script_nr': 2611, 'type': 'archive', 'script-type': 'utility', 'archive_name': 'xpt-0.4.8-r994.tgz', 'author': 'drdr xp'}
let g:vim_script_manager.plugin_sources['xptemplate']['strip-components'] = 0
let g:vim_script_manager.plugin_sources['command-T'] = { 'type' : 'git', 'url' : 'git://git.wincent.com/command-t.git' }

func ActivateMyAddons()
  set runtimepath+=~/vim-addons/vim-addon-manager
  try
    call scriptmanager#Activate(['nerd_commenter', 
                              \  'surround', 
                              \  'repeat', 
                              \  'supertab',
                              \  'align', 
                              \  'sqlutil',
                              \  'taglist',
                              \  'L9',
                              \  'fuzzyfinder',
                              \  'nerd_tree',
                              \  'bufkill',
                              \  'command-T',
                              \  'xptemplate'])
  catch /.*/
    echoe v:exception
  endtry
endfunc
call ActivateMyAddons()

The annoying part is when vim-addon-manager asks for the known repository addon for every plugin from my list. I think it should ask once at the very beginning, or a configuration variable should be available in order to have an unattended installation.

MarcWeber commented 13 years ago

Fixed. Reply by N or set s:c.dont_ask... s:c is an alias for g:vim_scr* (see DefineAndBind)

talek commented 13 years ago

That was fast! Thanks a lot!