6

I often want a new empty vertical pane (vim window / viewport ...) in my current Vim tab.

I know I can get a new empty horizontal pane by doing control+w n.

I know I can split the current pane into two identical vertical copies with control+w v, but then I always resort to the awkward workaround of opening a new empty horizontal pane within this vertical pane and then closing the duplicate view of the original pane which I didn't want.

Is there a built in way to just get a blank vertical pane?

11

From :help vnew:

    Like |:new|, but split vertically.  If 'equalalways' is set
    and 'eadirection' isn't "ver" the windows will be spread out
    horizontally, unless a width was specified.

However, it seems like Vim does not provide a mapping for :vnew which creates a new blank vertical split. It's easy to create this mapping yourself. For instance:

nnoremap <leader>v :vnew<CR>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.