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

Vam install path might have to be escaped if spaces in file names #99

Closed skeept closed 11 years ago

skeept commented 11 years ago

Today I was using an older windows where my home folder is "C:\Documents and Set...." first I was having error messages, but then I figured out that the problem is that the path should be escaped.

let vam_install_path = escape(expand(g:p0 . '/bundle'), ' \')

Maybe you could have a note about this in the documentation?

it's not a big deal anyway and probably vim users with this setting will know how to do this anyway.

MarcWeber commented 11 years ago

Which error have you had and when where did it happen? I don't think that's the right place to do the quoting.

skeept commented 11 years ago

this is what i get when I don't escape the path:

Error detected while processing function SetupVAM: line 4: E518: Unknown option: and line 11: E117: Unknown function: vam#ActivateAddons

my SetupVAM is:

fun SetupVAM() let g:vim_addon_manager = {} "let vam_install_path = escape(expand(g:p0 . '/bundle'), ' \') let vam_install_path = expand(g:p0 . '/bundle') exec 'set rtp+='.vam_install_path.'/vam' " let g:vim_addon_manager = { your config here see "commented version" example and help

let s:active_addons = ['supertab']

let g:vim_addon_manager.additional_addon_dirs = [escape(expand(g:p0 . '/notused_plugins'), ' \')]

call vam#ActivateAddons(s:active_addons, {'auto_install' : 0, 'force_loading_plugins_now': 1})

command! -nargs=* -bar -complete=customlist,vam#install#InstalledAddonCompletion AA \ :call vam#ActivateAddons([], {'auto_install' : 0, 'force_loading_plugins_now': 1}) endfun call SetupVAM()

ZyX-I commented 11 years ago

It is the documentation problem. Haven’t I said exe 'set' is a very bad choice due to escaping issues when changing vam#ActivateAddons to use :let and &runtimepath instead?