Split Screen Vertically in vi editor
To split screen vertically follow the below steps:
- If you are in insert mode Press Esc to enter in command mode and run the below command
:vsplit filename
or
:vs filename
- Alternatively you can press the keyboard combination ‘Ctrl + w’ and then press ‘v’ to achieve the same result.
- This will split screen into two sections vertically to Toggle between the workspaces use Ctrl+w+w
- To Toggle between the workspaces use the following commands. To navigate to the left pane and right pane respectively use the following key bindings.
Ctrl + w + h – To navigate to left panel
Ctrl + w + l – To navigate to right panel
How to Split Vi Screen Horizontally and Vertically in Linux
In this article, we will cover how to split the vi editor screen horizontally and vertically in Linux along with the command syntax and example, but first, we look at what is vi editor followed by screen splitting in vi editor along with examples and screenshots followed by resizing of windows/panels in the editor.
Linux
Linux was developed by Linus Torvalds in 1991 as a hobby project. It is an open-source (source code that can be used by anyone freely) kernel that is most popular and widely used in the industry as well as in personal systems. There are various operating systems based on the Linux kernel, some of the popular Linux distributions are Ubuntu, Cent OS, Red Hat, Debian, and Kali Linux.
VI Editor
Vi Editor is a widely used text editor in Unix/Linux systems and is known for its efficiency and flexibility. Vi editor was developed in 1976 by Bill Joy and later in 1991, an improved version of Vi editor was released which is known as VI IMproved (VIM). There are two modes in the vi editor:
- insert mode
- command mode