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

Netrw shows directory structure wrong: always shows directory inside itself

Expand Messages
  • Yuri Vic
    Netrw shows the entry with the current directory name inside itself. For example: There are two directories /some/dir and /some/dir/other-dir Command cd
    Message 1 of 4 , Mar 14, 2014
    • 0 Attachment
      Netrw shows the entry with the current directory name inside itself.
      For example:
      There are two directories /some/dir and /some/dir/other-dir
      Command 'cd /some/dir && vim .' shows this:
      ../
      dir/
      | other-dir/

      And command 'cd /some/dir/other-dir && vim .' shows this:
      ../
      other-dir/


      vim-7.4.192_1
      Netrw-v151j
      FreeBSD 9.1

      --
      --
      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/d/optout.
    • Charles E Campbell
      ... These two situations are both correct. case 1: cd /some/dir && pwd Shows that the current directory is /some/dir . So, vim . at that point will start the
      Message 2 of 4 , Mar 15, 2014
      • 0 Attachment
        Yuri Vic wrote:
        > Netrw shows the entry with the current directory name inside itself.
        > For example:
        > There are two directories /some/dir and /some/dir/other-dir
        > Command 'cd /some/dir && vim .' shows this:
        > ../
        > dir/
        > | other-dir/
        >
        > And command 'cd /some/dir/other-dir && vim .' shows this:
        > ../
        > other-dir/
        >
        These two situations are both correct.

        case 1: cd /some/dir && pwd
        Shows that the current directory is /some/dir .
        So, vim . at that point will start the tree listing from /some/dir.
        According to your example, the only item in /some/dir is also a
        directory, /some/dir/other-dir.
        The tree listing shows

        ../ the preceding directory
        dir/ the current directory
        | other-dir the only item in dir/

        case 2: cd /some/dir/other-dir && pwd
        Shows that the current directory is /some/dir/other-dir.
        So, vim . at that point will start the tree listing from
        /some/dir/other-dir.
        According to your example, the other-dir directory is empty.
        Accordingly, the tree listing shows

        ../ the preceding directory
        other-dir the current directory
        (no contents)

        I'm guessing that you aren't aware that netrw initializes the tree
        listing based on the current directory. If you want to go up a
        directory, well, that's what the "../" is for.

        Regards,
        C 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/d/optout.
      • Yuri Vic
        ... I think when people open a directory, they normally expect to see what is inside, like ls would show. It doesn t matter how this is implemented, but the
        Message 3 of 4 , Mar 15, 2014
        • 0 Attachment
          > These two situations are both correct.

          I think when people open a directory, they normally expect to see what is inside, like 'ls' would show. It doesn't matter how this is implemented, but the expected result is the list of what is inside, plus '..' item.

          --
          --
          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/d/optout.
        • Charles E Campbell
          ... I should mention that if you want a listing like ls would show, then you shouldn t be using tree style; use thin or wide style. Regards, C Campbell -- --
          Message 4 of 4 , Feb 26
          • 0 Attachment
            Yuri Vic wrote:
            >> These two situations are both correct.
            > I think when people open a directory, they normally expect to see what is inside, like 'ls' would show. It doesn't matter how this is implemented, but the expected result is the list of what is inside, plus '..' item.
            >
            I should mention that if you want a listing like ls would show, then you
            shouldn't be using tree style; use thin or wide style.

            Regards,
            C 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/d/optout.
          Your message has been successfully submitted and would be delivered to recipients shortly.