Monday, March 8, 2021

Re: Use :bdel to close directory listing?

Roland Freikamp wrote:
> Hi,
>
> since this is still really annoying me, I have to ask again, if there is
> *any* solution.
>
>> You can use :bd! to force a real deletion of a directory
>> as opposed to just hiding it.
> Unfortunately, this does not work. No matter how often I type ":bd",
> ":bd!", ":bn", ":bw", ... nothing happens.
> (VIM 8.2, netrw v168)
>
> Example:
>
> - directory structure:
>
> ./dir/
> ./dir/subfile
> ./file
>
> - vim *
>
> Result:
> - vim shows the "dir"-directory-listing, and there is no way to (a) delete
> the buffer or (b) switch to the next buffer with :bd/:bn.
> - :n switches to the next buffer, but does not cycle/wrap-around.
> - The *only* way to close the directory-listing, is:
> - :buffers
> - look for the buffer-numer
> - :bdel <num>
> - :bn
> In earlier vim-versions, :bdel was enough.
>
> So, is there *any* way to solve this, so that :bdel (or some other command)
> closes the directory listing and switches to the next buffer?
> (Or maybe a way to prevent "vim *" to open directory listings at all?)
>
Well, I just don't see that problem.

vim *
shows the dir/ and its file,
:bn then moves on to "file".

Repeating, and instead of :bn I used :bd -- and the "file" is opened
with contents shown.

Perhaps upgrading netrw would be of assistance in this; its at 171g
(v170 should be available as a regular vim update, and 171g is available
from my website as http://www.drchip.org/astronaut/vim/index.html#NETRW).

Regards,
Chip Campbell

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/79dd5d01-6f49-6f97-08ef-a3879c5a8a41%40drchip.org.

No comments: