I found the following chunk of command on this blog to have a file browser open by starting vim that I added to my .vimrc
. It splits the window into 2 panes: a file browser and the text editor. The active pane is the file browser one. When quitting (from the text editor pane), we have to quit the editor and then the file browser pane
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
augroup ProjectDrawer
autocmd!
autocmd VimEnter * :Vexplore
augroup END
What I would like to do have as behaviour is:
- To have the cursor on the text editor (and not on the file browser) when opening.
- When closing from the text editor, I want to quit vim altogether (and not having to close the text editor and then close the file browser pane): to have the text editor as "master"
Many thanks for your help!
:qa
or one of its variations (e.g.:wqa
to write before quitting).