v0id
v0id

Reputation: 73

How to prevent directory listing of netrw to appear in buffer

I use vim netrw for opening/editing files through browsing the directory hierachy. I also often open files browsing through the bufferlist with the :bn & :bp command.

So my questing is: Is there a way to prevent that the netrw directory listing appear when i switch the buffers with the :bn & :bp commands?

Marc

Upvotes: 2

Views: 1667

Answers (1)

romainl
romainl

Reputation: 196546

Netrw buffers have nobuflisted set by default which is supposed to prevent them from appearing in :ls or from being reachable via :bnext or :bprevious. For some reason, it works in my slightly outdated MacVim (7.4.52): the file listing is never displayed with :bn and :bp, but it doesn't work in my slightly less outdated GVim (7.4.131) where I experience the same issue as you. I never use file listing, though, so I had no idea about that bug before your question. And I just found out another bug where the contents of buffers replaced by the netrw listing are wiped out.

I'll try to upgrade to a more recent build, maybe you should too.

Upvotes: 1

Related Questions