Loading ...
Sorry, an error occurred while loading the content.
 

Re: openning files with '(' and ')' in the path - bug?

Expand Messages
  • Denis Perelyubskiy
    Bram, On Sun, 01 Feb 2004 16:20:46 +0100, Bram Moolenaar ... Thanks for a quick reply. If I correctly understood it, one should be able
    Message 1 of 4 , Feb 1, 2004
      Bram,

      On Sun, 01 Feb 2004 16:20:46 +0100, "Bram Moolenaar" <Bram@...>
      said:
      >
      > Denis Perelyubskiy wrote:
      > > [snip]
      > > I am on windows. I saw this problem in earlier versions,
      > > as well as the current 6.2-214 version.
      > >
      > > I have a file at the following location: C:\temp\(folder
      > > 1)\(folder 2)\myfile.txt
      > >
      > > When I drag/drop this file, all is well.
      > >
      > > When I double-click the file, the file is not loaded,
      > > and the string under the ruler reads: "C:/temp(folder
      > > 1)(folder 2)/myfile.h" [New File] "
      > >
      > > Notice how the '\' before (folder 1) and '\' before
      > > (folder 2) are gone.
      > > [snip]
      >
      > The problem is that ( and ) are not in 'isfname'. This
      > makes it possible to use a filename in parenthesis and
      > still use "gf" on it.
      >
      > A workaround is to use "--literal" in the shortcut:
      >
      > vim --literal "%1"
      >
      > I'm not sure how to make it work automatically. Perhaps
      > expanding filenames on the command line should be done
      > with ( and ) included in 'isfname'?

      Thanks for a quick reply. If I correctly understood it, one
      should be able to add '(' and ')' to the isfname and get
      the functionality I am looking for.

      I tried doing the following in my _vimrc: set isfname+=(,)
      (and verified that isfname contains the desired characters
      after startup). However, I am still seeing this behavior.
      I guess if this does not work I could play with gvim.bat,
      but that seems to be a bit clunky.

      Thanks,

      denis
      --
      // mailto: Denis Perelyubskiy <lists at overwhelmTAKECAPITALSOUT dot net>
      // icq : 12359698
    • Bram Moolenaar
      ... The problem is that file name expansion is done before reading the vimrc file. Thus changing isfname in your vimrc file has no effect for expanding the
      Message 2 of 4 , Feb 2, 2004
        Denis Perelyubskiy wrote:

        > > > I have a file at the following location: C:\temp\(folder
        > > > 1)\(folder 2)\myfile.txt
        > > >
        > > > When I double-click the file, the file is not loaded,
        > > > and the string under the ruler reads: "C:/temp(folder
        > > > 1)(folder 2)/myfile.h" [New File] "
        > > > [snip]
        > >
        > > The problem is that ( and ) are not in 'isfname'. This
        > > makes it possible to use a filename in parenthesis and
        > > still use "gf" on it.
        > >
        > > A workaround is to use "--literal" in the shortcut:
        > >
        > > vim --literal "%1"
        > >
        > > I'm not sure how to make it work automatically. Perhaps
        > > expanding filenames on the command line should be done
        > > with ( and ) included in 'isfname'?
        >
        > Thanks for a quick reply. If I correctly understood it, one
        > should be able to add '(' and ')' to the isfname and get
        > the functionality I am looking for.
        >
        > I tried doing the following in my _vimrc: set isfname+=(,)
        > (and verified that isfname contains the desired characters
        > after startup). However, I am still seeing this behavior.
        > I guess if this does not work I could play with gvim.bat,
        > but that seems to be a bit clunky.

        The problem is that file name expansion is done before reading the vimrc
        file. Thus changing 'isfname' in your vimrc file has no effect for
        expanding the file names on the command line. It does work if you edit
        a file later.

        --
        Shift happens.
        -- Doppler

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
        \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
      Your message has been successfully submitted and would be delivered to recipients shortly.