Monthly Archives: November 2017

Side-by-side editing of files in VIM

It you want to edit two files side-by-side in vi/vim then you can do it by using the -O option, as in this example:

# vim -O foo.txt bar.txt

I could never remember the option needed so thought I should note it here.

By the way, when you have finished, use :qa to quit all files being edited. If you just use :q you will have to type it to close each file. Also, use Ctrl+W, Ctrl+W to switch between the open files.