From 1ceb440ea48957130f905c2cc37aadcea6437e7f Mon Sep 17 00:00:00 2001 From: Damian Peterson Date: Mon, 15 May 2017 08:27:16 +1200 Subject: [PATCH] vimdiff: add page (#1373) --- pages/common/vimdiff.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pages/common/vimdiff.md diff --git a/pages/common/vimdiff.md b/pages/common/vimdiff.md new file mode 100644 index 0000000000..096be297ee --- /dev/null +++ b/pages/common/vimdiff.md @@ -0,0 +1,16 @@ +# vimdiff + +> Open up to four files in vim and show the differences between them. +> See `vim` documentation for working with files and navigating within a window. + +- Open two files and show the differences (up to four files can be compared): + +`vimdiff {{file1}} {{file2}}` + +- Open two files using a horizontal window split instead of the default vertical split: + +`vimdiff -o {{file1}} {{file2}}` + +- Move the cursor to the window on the left|right|up|down: + +`Ctrl + w {{h|l|k|j}}`