Vim in Linux is an enhanced version of VI. Need to download the installation yourself. After installation vim supports its own configuration and various plugins. Sometimes we see the source code need to look at both. h and. c files. It's uncomfortable to switch back and forth. VIM supports split screen. and dividing the screen into blocks.
Split screen: Enter SP carriage return at command line
Left and right split screen: VSP. Each Split-screen window can continue up and down and left and right split screen.
The top and bottom split-screen command can be followed by a file name to open the specified file.
The cursor moves in the divided screen: VIM supports h,j,k,l four keys to move the cursor. The cursor switches in the Split-screen window by first pressing CTRL+W and then pressing H,J,K,L.
Exit the split screen where the cursor is located: Ctrl+w C. This will not exit vim if the screen is the last one.
Ctrl+w Q. This command exits vim if the screen is the last one.
Sub-screen in vim