>> Something like (untested):
>> 
>> if has('win32') && (v:version<7.3 || v:version==7.3 && !has('patch450')) && 
>> &shell=~cmd
>>   let s:shxq_sav = &shellxquote
>>   set shellxquote="
> 
> Space, backslash and double-quote need backslash-escaping when used in a :set 
> statement, see :help option-backslash
> 
> Use
>       set shellxquote=\"
> to set 'shellxquote' to just a double-quote character. Or else, use
>       let &shellxquote = '"'
> 
>> endif
>> !"c:\program files (x86)\xyz\xyz.exe" "arg1 with spaces" "arg 2 with spaces"
>> if exists('s:shxq_sav')
>>   let &shellxquote = s:shxq_sav
>>   unlet s:shxq_sav
>> endif
>> 

Thank you all for your help. Of course you have double escape stuff when using 
cmd.exe twice, I missed that. By the way, here is a code snippet tested on 
Win32 based on your notes:

    if has('win32') && (v:version<703 || (v:version==703 && !has('patch450'))) 
&& &shell=~'cmd'
        let s:shxq_sav = &shellxquote
        set shellxquote=\"
    endif

    silent! exe 'noautocmd r!'.a:cmdline

    if exists('s:shxq_sav')
        let &shellxquote = s:shxq_sav
        unlet s:shxq_sav
    endif

Best regards,

Jan

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui