Must be something super obvious, but I can't figure out, and Google is not helping out either.

4 Answers 4

:help new
:help vnew

should bring you on course.

you will have a new buffer then, obviously. that buffer becomes a file only if you :w it to the disk.

  • 9
    And :set splitright puts the new split on the right. Awesome, thanks Nov 18, 2010 at 13:56
  • 5
    Also :set splitbelow is the corresponding command to make the new split appear on the bottom when splitting horizontally.
    – dsaxton
    Apr 22, 2016 at 14:10

another way is to do a <CTRL + W> n in normal mode. This will create a new split.


You can also do <CTRL + W> v in normal mode to create a vertical split (the previous one will do a horizontal split.

And just to be complete, you move to the different splits by doing <CTRL + W> <direction> with the direction being any h, j, k, or l

To close a buffer, do <CTRL + W> q

  • 4
    fyi: these open the current buffer in a new split, not a new file in a new split.
    – Emile 81
    May 10, 2017 at 8:44
  • 4
    For me, Ctrl+w n opens a split with a new buffer, but Ctrl+w v just splits the current buffer. Strange.
    – c24w
    Aug 4, 2017 at 8:46
  • 2
    if you're looking to create a vertical split with a new file, check out this question/answer vi.stackexchange.com/questions/2811/…
    – g19fanatic
    Aug 4, 2017 at 11:42
  • note that :split <filename> would open/edit a file in splitwindow.
    – Louis Go
    Nov 25, 2020 at 1:31
vim myfile.txt  # open one file in one window
:buffers        " shows one buffer with "myfile.txt" in it
:sp             " create split window; we now have one buffer with two windows.
:e newfile.txt  " create new buffer with new filename in first window
:buffers        " shows two buffers (myfile.txt & newfile.txt), each in own window

This is a good link: http://vim.wikia.com/wiki/Easier_buffer_switching


I used the Vim menu under File - Split Open. You will have to give a name for your new blank file though.

  • 2
    Vim has a menu?
    – frabjous
    Nov 18, 2010 at 16:23
  • gvim or macvim are able to display a menu, yes. what did you expect? :)
    – akira
    Nov 18, 2010 at 16:26
  • It seems that :sp also can work -- for those not using the gvim version.
    – Rolnik
    Nov 18, 2010 at 18:58

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.