How to open horizontal and vertical split mode to work with multiple files in VIM

Horizontal split mode

vim -o file1.txt file2.txt

Vertical split mode

vim -O file1.txt file2.txt

Now to switch between these files use Ctrl + W + W to toggle between these files.

By using these commands we can open n number of files.

Start a Conversation

Your email address will not be published. Required fields are marked *