Tip 40 | Divide Your Workspace into Split Windows |
Vim allows us to view multiple buffers side by side by dividing our workspace into split windows.
In Vim’s terminology, a window is a viewport onto a buffer (windowⓘ). We can open multiple windows, each containing the same buffer, or we can load different buffers into each window. Vim’s window management system is flexible, allowing us to build a workspace tailored to the demands of our workflow.
Creating Split Windows
When Vim starts up, it contains a single window. We can divide this window horizontally with the <C-w>s command, which creates two windows of equal height. Or we can use the <C-w>v command to split the window vertically, producing two windows of equal width. We can repeat these ...
Get Practical Vim, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.