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

61788Re: [Bug][w32] Completion for "filetype" doesn't work on windows

Expand Messages
  • Bram Moolenaar
    Jun 25, 2011
      Dominique Pellé wrote:

      > John Beckett wrote:
      >
      > > Dominique Pellé wrote:
      > >> It works for me on Linux too.  I don't have Windows to test.
      > >> I don't see why it would not work on Windows at first sight.
      > >
      > > I have just performed some tests on Windows XP:
      > >
      > > These work (pressing Tab provides argument completion):
      > >  :command! -nargs=* -complete=file Xfil :echo <q-args>
      > >  :command! -nargs=* -complete=syntax Xsyn :echo <q-args>
      > >  :command! -nargs=* -complete=environment Xenv :echo <q-args>
      > >
      > > This fails (pressing Tab for completion does nothing):
      > >  :command! -nargs=* -complete=filetype Xft :echo <q-args>
      > >
      > > The reason filetype completion fails on Windows is that
      > > dos_expandpath() in misc1.c is asked to expand text like
      > > "C:\.../vimfiles/{syntax,indent,ftplugin}/*.vim".
      > >
      > > The "{dir1,dir2}" syntax is handled by the operating system on
      > > Unix based systems, but not on Windows.
      > >
      > > John
      >
      > Thanks John. You're probably right about the {dir1,dir2}
      > glob expression not being portable.
      >
      > Attached patch avoids such glob expression and should
      > thus be more portable. I can only test it on Linux so I would
      > appreciate if someone else can confirm that it fixes the bug
      > on Windows.

      Thats looks better than my workaround. But it should be tested.
      Anyone?

      --
      Don't be humble ... you're not that great.
      -- Golda Meir

      /// Bram Moolenaar -- Bram@... -- 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_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
    • Show all 14 messages in this topic