MacVim+NERDTree: How to open a file as a split in furthest horizontal split

It seems as though my particular setup at that time may have been the issue, and I think I understand why. First, how to do what I asked:

  1. Open up nerdtree with :NERDTree
  2. Open your first file with or o
  3. Open second file in horizontal split pane with i
  4. From each of 2 horizontal panes create your third and fourth panes with s. This will open the selected files in vertical split of the last buffer you interacted with, splitting them each in half.
    Bare in mind that you’ll need to be in the pane you’d like to split, previous to selecting your file to open from NERDTree.

My issue arose primarily from my panes already being in an orientation of my top most diagram above. Everytime I tried to create a horizontal split with File 3 the split would just wind up in the first column of files.

I think I may see why now, though. With mvim you can interact through your mouse – and that’s the only way to get directly from that furthest column to NERDTree, without touching any other buffers (as far as I can tell). Whereas with regular vim, you wouldn’t be able to have the furthest column as the last interacted window, and therefore would never be able to split it.

Leave a Comment