Skip to main content
be more explicit
Source Link
maxschlepzig
  • 59.7k
  • 53
  • 224
  • 298

Open the side by side view:

Ctrl+w v

Change between them:

Ctrl+w h or l

You can then open another file for comparison in one side by entering a command such as:

:e file2.txt

Checkout the vimdiff command, part of the vim package, if you want a diff-like view, e.g.:

vimdiff file1.txt file2.txt

Open the side by side view:

Ctrl+w v

Change between them:

Ctrl+w h or l

Checkout the vimdiff command, part of the vim package, if you want a diff-like view:

vimdiff file1.txt file2.txt

Open the side by side view:

Ctrl+w v

Change between them:

Ctrl+w h or l

You can then open another file for comparison in one side by entering a command such as:

:e file2.txt

Checkout the vimdiff command, part of the vim package, if you want a diff-like view, e.g.:

vimdiff file1.txt file2.txt
Added syntax for usage of vimdiff command as mentioned in text to improve a) visibility by adding a code block and b) an example for easier understanding by newcomers.
Source Link

Open the side by side view:

Ctrl+w v

Change between them:

Ctrl+w h or l

Checkout the vimdiff command, part of the vim package, if you want a diff-like view..:

vimdiff file1.txt file2.txt

Open the side by side view:

Ctrl+w v

Change between them:

Ctrl+w h or l

Checkout the vimdiff command, part of the vim package, if you want a diff-like view..

Open the side by side view:

Ctrl+w v

Change between them:

Ctrl+w h or l

Checkout the vimdiff command, part of the vim package, if you want a diff-like view:

vimdiff file1.txt file2.txt
Source Link
maxschlepzig
  • 59.7k
  • 53
  • 224
  • 298

Open the side by side view:

Ctrl+w v

Change between them:

Ctrl+w h or l

Checkout the vimdiff command, part of the vim package, if you want a diff-like view..