Reply to message «dict+=», sent 21:24:07 18 March 2011, Friday by Hofmann, Joachim:
> execute "'set dict+= $VIM . "\\SQLDict\\" . db .".txt"
>
> I get errors because of the spaces.
> what is the correct call for it?
Either use escaping or, better, don't use :set for something more complex then
a
string `tab:>-':
let &dict.=",".escape($VIM.'\SQLDict\'.db.'.txt', '\,')
If you know that path will never contain commas, then you may remove `escape()'
call. With :set you will have to escape spaces, double strikes («"»),
backslashes and, eventually, escape commas with escaped backslashes.
Original message:
> Hello,
>
> I am trying to add a file and path to the dict option.
> It should contain the $VIM Variable and a self defined vim varable "db",
> and the path does contain spaces. Something like this
>
> execute "'set dict+= $VIM . "\\SQLDict\\" . db .".txt"
>
> I get errors because of the spaces.
> what is the correct call for it?
>
> Thank You
>
> Joachim
signature.asc
Description: This is a digitally signed message part.
