How to make Netrw Explorer appears automatically on the left side when opening a new tab

972 views Asked by At

my problem is quite simple, but I can't figure how to solve it. So I wanted to have a tree file explorer, thus I searched and found netrw. Online, I managed to find a good configuration that I modified a little and put in my .vimrc :

let g:netrw_banner = 0
let g:netrw_liststyle = 3
let g:netrw_browse_split = 3
let g:netrw_altv = 1
let g:netrw_winsize = 25
augroup ProjectDrawer
  autocmd!
  autocmd TabNew * :Vexplore
  autocmd VimEnter * :Vexplore
 
augroup END

So thanks to that, the tree appears when I enter vim, and if I click on a file it opens in a new tab. But in this tab, the content of the splitted screens are inverted : I get the content of the file in the little left screen, and the tree in the large right screen. I tried to modify the .vimrc config, changing Vexplore to Lexplore, but I get the same result... what must I do to get what I want ?

What I get when clicking on the file

1

There are 1 answers

0
quasi_deus On
  autocmd TabNew * :Vexplore!

Should do the trick.