Copying values from one file to another, or checking a function against its test, is easier with both on screen.
:vsplit config.example.yml
:split notes.txt
:vsplit (:vs) opens a file in a new window to the left of the current one, :split (:sp) above it. Without a file name they show the same file twice, which is handy for looking at two parts of a long file.
Moving around uses Ctrl-w and a direction:
Ctrl-w h
Ctrl-w l
Ctrl-w w
Ctrl-w =
h and l go left and right, j and k down and up, w cycles through all windows. Ctrl-w = makes them all the same size again after a terminal resize. :q closes only the current window, and :only closes all the others.
From the shell, vim -O a.txt b.txt opens files side by side right away, and -o stacks them.
If you’d rather have new windows open to the right and below, as most other editors do, these two options flip it:
set splitright splitbelow
I like that yanks and registers are shared between windows, so copying across is just y in one and p in the other.
Further reading: Vim help: :vsplit, Vim help: CTRL-W =
Going deeper: Guide: advanced tmux, a config that grows with you, formats, layouts and more