Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open file in vertical split in Vim / netrw

Tags:

vim

netrw

If I open vim with vim . netrw provides me with a nice list of the files and directories in the current directory.

If I open a file using v the file opens in a very narrow split down the left hand side of the screen and the directory listing remains open in a wide split on the right hand side of the screen.

Ideally I'd like it to have the opposite effect. ie. Show the directory listing in a narrow split on the left hand side of the screen and show the file in a wide split on the right hand side of the screen.

Any help much appreciated.

like image 333
jx12345 Avatar asked Apr 01 '16 18:04

jx12345


People also ask

What is Netrw?

Netrw supports reading and writing files across networks. One may use urls for filenames or one may use netrw's Nread and Nwrite commands. Netrw as provided here supports remote and local directory browsing, and supports editing files across the network using a variety of methods.


1 Answers

Netrw v153 and later (May 28, 2014) gives you the :Lexplore command, which, by default, opens a directory listing on the left hand side and opens files to the right (by pressing <cr>).

like image 67
user21497 Avatar answered Sep 22 '22 16:09

user21497