Question: *This is the same question as [on SuperUser](https://superuser.com/questions/364645/opening-a-file-from-netrw-in-a-specified-split), but I feel it has a better chance of being answered here, so ...*

In Vim, I have four splits - two by two - and in the upper left one netrw is open. Is there a way to open a file from netrw in the lower right split, lower left, etc.?

Answer: 
there're some hints here <https://superuser.com/questions/377501/keep-cursor-in-netrw-window-when-browsing-files-in-vim>

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.
To bring above answers together some inspirations: I use the following window configuration together with netrw (together with :let g:netrw\_liststyle = 2):

```

    -------------------------------- ...
    Netrw-split: topleft spilt
    -------------------------------- ...
             |          |          |
    working  | working  | working  |
    window 1 | window 2 | window 3 | ...
             |          |          |

```

Thus I can go directly to Netrw-split from every other window. Then I put to my .vimrc:

```

    augroup netrw
        autocmd!
        autocmd WinLeave * if &ft !=# "netrw" | let g:netrw_chgwin = winnr() | endif
        autocmd filetype netrw call Netrw_mappings()
    augroup END

```

The WinLeave command sets the global g:netrw\_chgwin variable to the window just left (except if we are in the netrw-window). Thus netrw will open any file in the window from which I accessed it and due to the window layout I can access netrw from any other window.

The autocmd 'filetype' is used to also create a new file in the window from which I accessed netrw. For this netrw's '%' command has to be overwritten:

```

    function! Netrw_mappings()
        noremap <buffer>% :call CreateInLastWindow()<cr>
    endfunction

```

With a function creating the new file in window g:netrw\_chgwin:

```

    function! CreateInLastWindow()
        let l:filename = input("new file's name: ")
        let l:netrwdir = b:netrw_curdir
        execute g:netrw_chgwin . "wincmd w"
        execute 'edit ' . l:netrwdir.'/'.l:filename
    endfunction

```