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

netrwBrowseX should use , not

Expand Messages
  • Jonas Diemer
    Hi, working on windows, I found that opening files externally using gx does not work well for filenames with spaces. I added space to the filename characters
    Message 1 of 2 , Jul 13 12:35 AM
    • 0 Attachment
      Hi,

      working on windows, I found that opening files externally using gx does not work well for filenames with spaces. I added space to the filename characters (:set isfname=+32), which fixes gf. However, I still cannot open files with spaces using gx

      The fix is rather easy: in plugins/netrwPlugin.vim, change line 86 from

       nno <silent> <Plug>NetrwBrowseX :call netrw#NetrwBrowseX(expand("<cWORD>"),0)<cr>

      to

       nno <silent> <Plug>NetrwBrowseX :call netrw#NetrwBrowseX(expand("<cfile>"),0)<cr>

      I currently have the latter line in my .vimrc to override the default, but I think this should work better for everyone, so it would be nice to include it upstream. 

      Regards
      Jonas

      --
      --
      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
       
      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
       
       
    • Charles E Campbell
      ... This suggestion has now been implemented in v150d of netrw, available from my website: http://www.drchip.org/astronaut/vim/index.html#NETRW . Thank you!
      Message 2 of 2 , Jul 13 6:36 AM
      • 0 Attachment
        Jonas Diemer wrote:
        > Hi,
        >
        > working on windows, I found that opening files externally using gx
        > does not work well for filenames with spaces. I added space to the
        > filename characters (:set isfname=+32), which fixes gf. However, I
        > still cannot open files with spaces using gx
        >
        > The fix is rather easy: in plugins/netrwPlugin.vim, change line 86 from
        >
        > nno <silent> <Plug>NetrwBrowseX :call
        > netrw#NetrwBrowseX(expand("<cWORD>"),0)<cr>
        >
        > to
        >
        > nno <silent> <Plug>NetrwBrowseX :call
        > netrw#NetrwBrowseX(expand("<cfile>"),0)<cr>
        >
        > I currently have the latter line in my .vimrc to override the default,
        > but I think this should work better for everyone, so it would be nice
        > to include it upstream.
        >
        This suggestion has now been implemented in v150d of netrw, available
        from my website: http://www.drchip.org/astronaut/vim/index.html#NETRW .

        Thank you!
        Chip Campbell

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

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      Your message has been successfully submitted and would be delivered to recipients shortly.