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

Re: [vimdev] netrw problems

Expand Messages
  • Charles E. Campbell
    ... Thank you! ... Hmm, I m seeing the first file s filetype not get set but the second one getting set correctly. Seems like the opposite sequence from what
    Message 1 of 3 , Aug 4, 2003
    View Source
    • 0 Attachment
      On Sun, Jul 06, 2003 at 11:11:01AM -0400, Aron Griffis wrote:
      > Some things I've noticed with the netrw plugin (which is fantastic, by
      > the way):

      Thank you!

      > 1. The filetype is not always set correctly. For example:
      >
      > vim rsync://kaf/proj/xxdriver/{xx.c,xxeng.c}
      >
      > When vim starts, filetype=c for xx.c. When I use :n to edit xxeng.c,
      > filetype is blank. If I change the order of the files, the first one
      > is always set correctly, and the following one is not.

      Hmm, I'm seeing the first file's filetype not get set but the
      second one getting set correctly. Seems like the opposite sequence
      from what you wrote, but I'll look into it.

      > 2. When I write the file, the cursor always jumps to the top of the
      > file.

      The current version (v33) available under

      http://www.erols.com/astronaut/vim/index.html#vimlinks_scripts

      already addresses this problem. Hmm, putting a

      filetype detect

      in the appropriate place in <netrw.vim> seems to fix this problem.
      I've uploaded a v34 with this fix; please feel free to try it out!

      > 3. After a file loads (for example rsync://kaf/proj/xxdriver/xx.c), if I
      > hit ctrl-6 to access the previous file, it jumps to a file in /tmp.
      > I realize that I'm tripping on the inner workings of netrw, but it's
      > not expected behavior...

      Not sure what to do about this one.

      Regards,
      Chip Campbell

      --
      Charles E Campbell, Jr, PhD _ __ __
      Goddard Space Flight Center / /_/\_\_/ /
      cec@... /_/ \/_//_/
      PGP public key: http://www.erols.com/astronaut/pgp.html
    • Flemming Madsen
      ... I have had success with a construction like: let AltBuf = bufnr(@#) if AltBuf = 0 | execute buffer .AltBuf | endif execute edit .File when jumping
      Message 2 of 3 , Aug 5, 2003
      View Source
      • 0 Attachment
        >
        >>3. After a file loads (for example rsync://kaf/proj/xxdriver/xx.c), if I
        >> hit ctrl-6 to access the previous file, it jumps to a file in /tmp.
        >> I realize that I'm tripping on the inner workings of netrw, but it's
        >> not expected behavior...
        >
        >
        > Not sure what to do about this one.
        >

        I have had success with a construction like:

        let AltBuf = bufnr(@#)
        if AltBuf >= 0 | execute "buffer ".AltBuf | endif
        execute "edit ".File

        when jumping from a temporary file to the one to actually show.

        wkr /Flemming
      Your message has been successfully submitted and would be delivered to recipients shortly.