Sunday, January 8, 2012

Re: Hel with vim-addon-manager -a

On Jan 8, 2012, at 9:33 AM, Marc Weber wrote:

> The update script broke - the plugin zip file on www.vim.org is dated
> 2011-08-12 - docs were rewritten on 2011-11-something.
>
> remove your vim-addon-manager folder and your SetupVAM function should
> automatically fetch the current version based on git.
>
> I will give improving the plugin site of www.vim.org a higher priority.

Thanks, Marc. I thought I should update VAM before responding to your other questions.

I tried the above and it didn't work. So I tried updating with UpdateAddons and worked. Sounds like you must have fixed the plugin site before I got to it.

After upgrading I noticed that the code for putting VAM in the runtime path--at least that's how I interpret what it does--that appears on lines 86-119 of the updated documentation is different from the corresponding code in the earlier documentation. I replaced the latter with the former, only adding the names of my plugins that were installed with VAM. Below is what I put in my .vimrc:

fun SetupVAM()
" YES, you can customize this vam_install_path path and everything still works!
let vam_install_path = expand('$HOME') . '/.vim/vim-addons'
exec 'set runtimepath+='.vam_install_path.'/vim-addon-manager'

" * unix based os users may want to use this code checking out VAM
" * windows users want to use http://mawercer.de/~marc/vam/index.php
" to fetch VAM, VAM-known-repositories and the listed plugins
" without having to install curl, unzip, git tool chain first
" -> BUG [4] (git-less installation)
if !filereadable(vam_install_path.'/vim-addon-manager/.git/config') && 1 == confirm("git clone VAM into ".vam_install_path."?","&Y\n&N")
" I'm sorry having to add this reminder. Eventually it'll pay off.
call confirm("Remind yourself that most plugins ship with documentation (README*, doc/*.txt). Its your first source of knowledge. If you can't find the info you're looking for in reasonable time ask maintainers to improve documentation")
exec '!p='.shellescape(vam_install_path).'; mkdir -p "$p" && cd "$p" && git clone --depth 1 git://github.com/MarcWeber/vim-addon-manager.git'
" VAM run helptags automatically if you install or update plugins
exec 'helptags '.fnameescape(vam_install_path.'/vim-addon-manager/doc')
endif

" Example drop git sources unless git is in PATH. Same plugins can
" be installed form www.vim.org. Lookup MergeSources to get more control
" let g:vim_addon_manager['drop_git_sources'] = !executable('git')

call vam#ActivateAddons(['taskpaper','vimwiki'], {'auto_install' : 0})
" sample: call vam#ActivateAddons(['pluginA','pluginB', ...], {'auto_install' : 0})
" where 'pluginA' could be "git://" "github:YourName" or "snipmate-snippets" see vam#install#RewriteName()
" also see section "5. Installing plugins" in VAM's documentation
" which will tell you how to find the plugin names of a plugin
endf
call SetupVAM()
" experimental: run after gui has been started (gvim) [3]
" option1: au VimEnter * call SetupVAM()
" option2: au GUIEnter * call SetupVAM()
" See BUGS sections below [*]
" Vim 7.0 users see BUGS section [3]

After doing so I can't get vim to open a window. When I take out the code above I am able to open a window.

What's going on?

Regards,
------------------------------------------------------------------------------------------
Eric Weir
Decatur, GA
eeweir@bellsouth.net

"Style is truth."

- Ray Bradbury

--
You received this message from the "vim_use" 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

No comments: