Commands for opening new windows
There are lots of ways to open a new window in Vim. Most of the time it involves splitting the current window in two — either horizontally (two windows on top of each other) or vertically (two windows side-by-side). This is why you’ll often hear windows called “splits” in the community.
The simplest ways in are the split commands: :split (horizontal) and :vsplit (vertical). Both accept a filename, which tells Vim to:
- Load the given file into a new buffer.
- Split the current window in two.
- Open the buffer in the new window.
Alongside the editor’s exercise.txt there are three other files: a.txt, b.txt, and c.txt. Work through the checklist to open each one in a split of its own.