Michael Hordijk wrote:

> On 05/05/2009 01:04 PM, Matt Wozniski wrote:
> > On Tue, May 5, 2009 at 12:50 PM, Michael Hordijk wrote:
> >> Vim doesn't seem to handle a comma in $HOME at all.  In this case, $HOME
> >> = /u/hordijk,spin  strace shows that Vim seems to be doing some odd
> >> parsing around the comma:
> >>
> >> stat64("/u/hordijk/syntax/synload.vim", 0xbfa03e9c) = -1 ENOENT (No such
> >> file or directory)
> >> stat64("spin/.vim/syntax/synload.vim", 0xbfa03e9c) = -1 ENOENT (No such
> >> file or directory)
> >>
> >> Anybody else experience a similar issue, or I am the only one with a
> >> comma in their homedir? :)
> >
> > Vim uses a comma separated list of directories to search for runtime
> > files.  Your home directory is added to that list, but appears as two
> > elements instead of one, because of the comma in it.  I doubt there's
> > any way to get around this.  You *might* be able to hack things to
> > make it work, but it would be ugly.  In general, I would think that
> > comma is one of those strange characters that you shouldn't embed in
> > $HOME, like : and ;
> 
> Of course, that would be very unfortunate, as we do some things with 
> automount and such that comma's are in a lot of directory names.  In the 
> three years of working with this, Vim is the first application that 
> seems to have a problem with it.
> 
> That being said, normally when an application has a problem with certain 
> characters in a string, said characters are escaped before they're used. 
>   Some parts of Vim work fine with
> 
> HOME='/u/hordijk\,spin'
> 
> but then other parts break.
> 
> I'm thinking that Vim, if it finds a comma in $HOME, should escape it 
> before adding it to an internal structure that it expects to be comma 
> delimited.  If Vim has a concept of escaping, then it should be easy. 
> If not, it would probably be more involved.

The special characters in $HOME should indeed be escaped.  I can only
think of a comma being special here.

You can work around it by explicitly setting the options that use $HOME
in their default value.

-- 
An indication you must be a manager:
You believe you never have any problems in your life, just
"issues" and "improvement opportunities".

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui