Open file in new buffer in NERDTree

nerdtreevim

I’m just getting used to NERDTree and Vim.

I currently have one file open in a buffer. How do I get NERDTree to open another file in a buffer to the right?

If I just navigate to the file in NERDTree and press enter, then the file opens in the same buffer. I’d like to have two files open at once.

Screenshot

Best Answer

When you press ? in the NERDTree sidebar, you'll get a help of all the available commands.

Among them (in their default config) are i for a split and s for a vertical split.

You can read all about those in the detailed :help NERDTreeMappings; it's also possible to re-assign them, should those keys not match your taste.

Related Question