1

When I open netrw and choose a file, it opens in a new buffer. This means that if I do b% to go to previously opened buffer I will go back to netrw, rather then the file I was editing before.

How can I change this behaviour so I can either open new file in netrw's buffer or close the buffer that I used for file opening?

Adam
  • 3,415
  • 4
  • 30
  • 49

1 Answers1

1

There is the option for netrw g:netrw_altfile

Here is the helptext

some like |CTRL-^| to return to the last
edited file.  Choose that by setting this
parameter to 1.
Others like |CTRL-^| to return to the
netrw browsing buffer.  Choose that by setting
this parameter to 0.
default: =0

If you want to close the netrw buffer after opening a file, you will need to write some vim script I think, there are some examples online but I haven't seen one I would recommend.

lukas-reineke
  • 3,132
  • 2
  • 18
  • 26