Two things are needed. First you need to change g:netrw_browse_split
. Here's the help for that setting:
*g:netrw_browse_split* when browsing, <cr> will open the file by:
=0: re-using the same window (default)
=1: horizontally splitting the window first
=2: vertically splitting the window first
=3: open file in new tab
=4: act like "P" (ie. open previous window)
"Open previous window" is what we want so
let g:netrw_browse_split = 4
Then you just need to press the right key when the cursor is over the file you want to open. The help excerpt also gives us that information (<cr> will open the file by
...).
So, not O or V but Enter. That should do it.
Note: Per the help on the line about value 4
the approach I use above is "like" pressing P
. When I tried P
it didn't work as expected so I chose an approach which did work. To be fair, my netrw configuration is not default so you may want to try P
for yourself (without changing the variable from 0
).