Split a window in vim to view files, then open the file in the original window

I tried the NERDTree plugin for vim and it is very powerful, but it probably overwhelms what I use it for. I’m not an anti-plugin at all, but I don’t like relying on plugins when I don’t fully use them.

What I'm really looking for is the ability to open a file browser in a split, similar to how :Sex and :Vex . I would select the file that I want, which will open in the original window, and the file browser will quit.

Are there any built-in commands that will work this way?

+4
source share
1 answer

See :help netrw for all the mappings available in :Ex and friends.

You want just P

By the way, netrw is also a plugin.

+5
source

All Articles