I would like to automatically close the netrw window when I open a file. I've found a similar question (NERDTree How to open a file and automatically close the explorer buffer), but it refers to NERDTree - not netrw.
This is my .vimrc file:
let g:netrw_banner = 0
let g:netrw_liststyle = 3
let g:netrw_browse_split = 4
let g:netrw_altv = 1
let g:netrw_winsize = 25
set autochdir
map <C-E> :Lexplore<CR>
Edit:
This works when using :Explore, but in my case, I'm trying to make it work when I use :Lexplore
:Explore, the netrw Directory Listing comes up in the current buffer, I select a file pressing<Enter>and that file is opened in the current window (and netrw is closed)? – Christian Brabandt Jul 19 '17 at 07:28:Lexis a persistent browser (stays open until manually closed): https://stackoverflow.com/questions/61766814/close-netrw-explorer-after-opening-a-new-file ... I have this in my~/.vimrc:noremap <silent> <leader>l :Lex<CR>("leader elle") – Victoria Stuart Mar 08 '21 at 18:26