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

delete just left netrw buffer after opening file

Expand Messages
  • Enno
    Can one configure netrw so that when opening a file in netrw the just left netrw buffer is automatically deleted? For example type :e ., navigate to a file,
    Message 1 of 10 , May 23, 2014
      Can one configure netrw so that when opening a file in netrw the just left netrw buffer is automatically deleted?

      For example type :e ., navigate to a file, hit <CR>. Then there is the netrw buffer, created by :e . that we just left, and has done its service. Is there an autocmd to delete it? Naive attempts under Gvim 7.4.282 and Windows 7 64 bit failed.

      --
      --
      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.
    • Enno
      ... This is, under netrw 1.53b. Another curiosity is that, inside a netrw buffer, the :bprevious is without effect, but :bnext works as expected. -- -- You
      Message 2 of 10 , May 23, 2014
        Le vendredi 23 mai 2014 10:42:55 UTC+2, Enno a écrit :
        > Can one configure netrw so that when opening a file in netrw the just left netrw buffer is automatically deleted?
        >
        > For example type :e ., navigate to a file, hit <CR>. Then there is the netrw buffer, created by :e . that we just left, and has done its service. Is there an autocmd to delete it? Naive attempts under Gvim 7.4.282 and Windows 7 64 bit failed.

        This is, under netrw 1.53b. Another curiosity is that, inside a netrw buffer, the :bprevious is without effect, but :bnext works as expected.

        --
        --
        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.
      • Enno
        ... Unexpectedly, let g:netrw_liststyle = 2 instead of let g:netrw_liststyle = 3 now closes the netrw buffer when opening a file by . -- -- You received
        Message 3 of 10 , May 23, 2014
          Le vendredi 23 mai 2014 10:42:55 UTC+2, Enno a écrit :
          > Can one configure netrw so that when opening a file in netrw the just left netrw buffer is automatically deleted?
          >
          > For example type :e ., navigate to a file, hit <CR>. Then there is the netrw buffer, created by :e . that we just left, and has done its service. Is there an autocmd to delete it? Naive attempts under Gvim 7.4.282 and Windows 7 64 bit failed.

          Unexpectedly, let g:netrw_liststyle = 2 instead of let g:netrw_liststyle = 3 now closes the netrw buffer when opening a file by <CR>.

          --
          --
          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 Campbell
          ... That s the default behavior. Regards, Chip Campbell -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the
          Message 4 of 10 , May 23, 2014
            Enno wrote:
            > Can one configure netrw so that when opening a file in netrw the just left netrw buffer is automatically deleted?
            >
            > For example type :e ., navigate to a file, hit <CR>. Then there is the netrw buffer, created by :e . that we just left, and has done its service. Is there an autocmd to delete it? Naive attempts under Gvim 7.4.282 and Windows 7 64 bit failed.
            >
            That's the default behavior.

            Regards,
            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/d/optout.
          • Charles Campbell
            ... Hello, Enno: I m not seeing any problem with :bp or :bn using netrw. I used both wide and tree listing styles, as I m guessing that you typically use tree
            Message 5 of 10 , May 23, 2014
              Enno wrote:
              > Le vendredi 23 mai 2014 10:42:55 UTC+2, Enno a écrit :
              >> Can one configure netrw so that when opening a file in netrw the just left netrw buffer is automatically deleted?
              >>
              >> For example type :e ., navigate to a file, hit <CR>. Then there is the netrw buffer, created by :e . that we just left, and has done its service. Is there an autocmd to delete it? Naive attempts under Gvim 7.4.282 and Windows 7 64 bit failed.
              > This is, under netrw 1.53b. Another curiosity is that, inside a netrw buffer, the :bprevious is without effect, but :bnext works as expected.
              >
              Hello, Enno:

              I'm not seeing any problem with :bp or :bn using netrw. I used both
              wide and tree listing styles, as I'm guessing that you typically use
              tree style, with netrw v149 and v153c.

              Please:

              * give a list of all netrw options you're using
              * try it with netrw v153c
              (http://www.drchip.org/astronaut/vim/index.html#NETRW)
              * give a sequence of commands that elicit the misbehavior

              Merci,
              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/d/optout.
            • Charles E Campbell
              ... Please try netrw this way: (simple.netrw is attached) vim -u simple.netrw some-directory-here You ll need to hit the i key a few times to get your
              Message 6 of 10 , May 26, 2014
                Enno wrote:
                > Le vendredi 23 mai 2014 10:42:55 UTC+2, Enno a écrit :
                >> Can one configure netrw so that when opening a file in netrw the just left netrw buffer is automatically deleted?
                >>
                >> For example type :e ., navigate to a file, hit <CR>. Then there is the netrw buffer, created by :e . that we just left, and has done its service. Is there an autocmd to delete it? Naive attempts under Gvim 7.4.282 and Windows 7 64 bit failed.
                > This is, under netrw 1.53b. Another curiosity is that, inside a netrw buffer, the :bprevious is without effect, but :bnext works as expected.
                >
                Please try netrw this way: (simple.netrw is attached)

                vim -u simple.netrw some-directory-here

                You'll need to hit the "i" key a few times to get your preferred tree
                listing.

                Regards,
                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/d/optout.
              • Enno
                ... Hello Charles, Thank you for your responsiveness. Here are my netrw settings: let g:netrw_banner = 0 let g:netrw_special_syntax = 1 let
                Message 7 of 10 , Jun 1 3:40 AM
                  Am Freitag, 23. Mai 2014 10:42:55 UTC+2 schrieb Enno:
                  > Can one configure netrw so that when opening a file in netrw the just left netrw buffer is automatically deleted?
                  >
                  > For example type :e ., navigate to a file, hit <CR>. Then there is the netrw buffer, created by :e . that we just left, and has done its service. Is there an autocmd to delete it? Naive attempts under Gvim 7.4.282 and Windows 7 64 bit failed.

                  Hello Charles,

                  Thank you for your responsiveness. Here are my netrw settings:

                  let g:netrw_banner = 0
                  let g:netrw_special_syntax = 1
                  let g:netrw_dirhistmax=100
                  let g:netrw_winsize=30
                  let g:netrw_altv = 1
                  let g:netrw_altfile=1
                  let g:netrw_preview=1
                  let g:netrw_chgwin = winnr()
                  let g:netrw_retmap = 1
                  let g:netrw_home = $HOME."/.cache"
                  let g:netrw_liststyle=3

                  Now that I discovered let g:netrw_liststyle=2, I prefer to keep it this way and everything works fine for the moment, buffer switching and closing netrw on hitting <CR> on a file.

                  I will check your newest version as soon as it hits the github mirror, and check back.

                  Merci aussi

                  Enno

                  --
                  --
                  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.
                • Enno
                  ... I forgot the additional netrw settings by Vim-Vinegar. The ones just posted are set after these: let g:netrw_sort_sequence = [ /]$,*, %( .
                  Message 8 of 10 , Jun 1 3:43 AM
                    Am Freitag, 23. Mai 2014 10:42:55 UTC+2 schrieb Enno:
                    > Can one configure netrw so that when opening a file in netrw the just left netrw buffer is automatically deleted?
                    >
                    > For example type :e ., navigate to a file, hit <CR>. Then there is the netrw buffer, created by :e . that we just left, and has done its service. Is there an autocmd to delete it? Naive attempts under Gvim 7.4.282 and Windows 7 64 bit failed.

                    I forgot the additional netrw settings by Vim-Vinegar. The ones just posted are set after these:

                    let g:netrw_sort_sequence = '[\/]$,*,\%(' . join(map(split(&suffixes, ','), 'escape(v:val, ".*$~")'), '\|') . '\)[*@]\=$'
                    let s:escape = 'substitute(escape(v:val, ".$~"), "*", ".*", "g")'
                    let g:netrw_list_hide =
                    \ join(map(split(&wildignore, ','), '"^".' . s:escape . '. "$"'), ',') . ',^\.\.\=/\=$' .
                    \ (get(g:, 'netrw_list_hide', '')[-strlen(s:dotfiles)-1:-1] ==# s:dotfiles ? ','.s:dotfiles : '')
                    let g:netrw_banner = 0

                    --
                    --
                    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
                    ... Hello, Enno: I just tried vim -u enno.vimrc . , navigated to a file, hit -- and the netrw browser disappeared and the selected file appeared in its
                    Message 9 of 10 , Jun 1 11:37 AM
                      Enno wrote:
                      > Am Freitag, 23. Mai 2014 10:42:55 UTC+2 schrieb Enno:
                      >> Can one configure netrw so that when opening a file in netrw the just left netrw buffer is automatically deleted?
                      >>
                      >> For example type :e ., navigate to a file, hit <CR>. Then there is the netrw buffer, created by :e . that we just left, and has done its service. Is there an autocmd to delete it? Naive attempts under Gvim 7.4.282 and Windows 7 64 bit failed.
                      > I forgot the additional netrw settings by Vim-Vinegar. The ones just posted are set after these:
                      >
                      > let g:netrw_sort_sequence = '[\/]$,*,\%(' . join(map(split(&suffixes, ','), 'escape(v:val, ".*$~")'), '\|') . '\)[*@]\=$'
                      > let s:escape = 'substitute(escape(v:val, ".$~"), "*", ".*", "g")'
                      > let g:netrw_list_hide =
                      > \ join(map(split(&wildignore, ','), '"^".' . s:escape . '. "$"'), ',') . ',^\.\.\=/\=$' .
                      > \ (get(g:, 'netrw_list_hide', '')[-strlen(s:dotfiles)-1:-1] ==# s:dotfiles ? ','.s:dotfiles : '')
                      > let g:netrw_banner = 0
                      Hello, Enno:

                      I just tried

                      vim -u enno.vimrc .

                      , navigated to a file, hit <cr> -- and the netrw browser disappeared
                      and the selected file appeared in its stead. Thus, the "just left netrw
                      buffer" was automatically deleted (actually, its still there; if you
                      try :ls! you should see it, but otherwise :bn :bp et al will ignore
                      it, etc). I did this with netrw v153g, which you can get from my
                      website: http://www.drchip.org/astronaut/vim/index.html#NETRW.

                      I had to comment out the g:netrw_list_hide stuff because s:dotfiles is
                      not defined.

                      There were no changes that I made for this; I suspect its a vim-vinegar
                      thing. Please rename vim-vinegar so that it doesn't get used and see if
                      the problem you're complaining of disappears too.

                      Regards,
                      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/d/optout.
                    • Enno
                      ... Hello, I can confirm that the issue is resolved in the Netrw version from June 11, Thank you! Enno -- -- You received this message from the vim_dev
                      Message 10 of 10 , Jun 22 8:58 AM
                        Le vendredi 23 mai 2014 10:42:55 UTC+2, Enno a écrit :
                        > Can one configure netrw so that when opening a file in netrw the just left netrw buffer is automatically deleted?
                        >
                        > For example type :e ., navigate to a file, hit <CR>. Then there is the netrw buffer, created by :e . that we just left, and has done its service. Is there an autocmd to delete it? Naive attempts under Gvim 7.4.282 and Windows 7 64 bit failed.

                        Hello,

                        I can confirm that the issue is resolved in the Netrw version from June 11, Thank you!

                        Enno

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