Keep cursor in Netrw window when browsing files in VIM

Solution 1:

Put this in your .vimrc,

let g:netrw_preview = 1

to configure vertical preview splits, then when the cursor is over the desired file, type p to open a preview window. To close the window, type Ctrl-W z.

The term used in vim for a window that's opened without the cursor moving to it is a "preview window". To find out more about this, see

:help netrw-preview
:help CTRL-W_z

or just

:help netrw

and browse the table of contents for other browsing commands and other netrw features.

Solution 2:

You could use :Lexplore, available with netrw v150 or later (its now up to v154, which you may get from http://www.drchip.org/astronaut/vim/index.html#NETRW).