Thursday, February 17, 2011

Re: Problem opening files when directory name contains a '#'

Jeff Lanzarotta wrote:

> I just ran into a weird situation and was wondering if there is a way to get
> around it other than renaming the directory that contains the '#' character.
>
> A little background. I am using Windows XP, the latest version of Vim taken
> from the Mercurial repository and compiled using Visual Studio 2010. My version
> of Vim lives under the C:\vim directory.
>
> Steps to create the weirdness:
>
> 1) Open a Windows Command Prompt.
>
> 2) Start a new version of Vim Server, since I like only having one instance of
> Vim running at a time, by entering:
>
> 'c:\vim\gvim -u NONE --servername VIM'
>
> 3) Move to the directory that contains the '#' character:
>
> 'cd c:\develop\c#\foo'
>
> 3) Create a new files by entering:
>
> 'c:\vim\gvim -u NONE --servername VIM --remote-silent bar.cs
>
> 4) In the instance of Vim that is already running I get the following error and
> the file is not opened:
>
> 'E194: No alternate file name to substitute for '#''
>
> Any idea what is happening here?
>
> Sure, I could rename the directory and remove the '#' character, but I was
> wondering if there is something else...

Passing the directory of the file to the Vim server probably lacks
escaping the # with a backslash. That's a bug.

--
ARTHUR: (as the MAN next to him is squashed by a sheep) Knights! Run away!
Midst echoing shouts of "run away" the KNIGHTS retreat to cover with the odd
cow or goose hitting them still. The KNIGHTS crouch down under cover.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

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