Sponsored Content
Top Forums UNIX for Advanced & Expert Users vimdiff jump to other file or switch windows Post 302546393 by cokedude on Thursday 11th of August 2011 06:12:26 AM
Old 08-11-2011
vimdiff jump to other file or switch windows

This took me quite awhile to find so I wanted to share this with other people.

Code:
To switch windows in vimdiff or 
 to navigate windows in vimdiff or 
 to change windows in vimdiff try the following: 
 The ":vertical" command can be inserted before another command that 
 splits a window. 
 
MOVING BETWEEN WINDOWS 
 
         CTRL-W h        move to the window on the left 
         CTRL-W j        move to the window below 
         CTRL-W k        move to the window above 
         CTRL-W l        move to the window on the right 
 
         CTRL-W t        move to the TOP window 
         CTRL-W b        move to the BOTTOM window 
 
  Moving windows 
 ===== 
 
         CTRL-W K        move window to the upper 
         CTRL-W H        move window to the far left 
         CTRL-W J        move window to the bottom 
         CTRL-W L        move window to the far right 
 
===================== 
 
I post this info because I has so much trouble finding it.

vimdiff - Edit two or Three versions of a file with Vim and show differences

switch windows in vimdiff - bash tips | Google Groups
This User Gave Thanks to cokedude For This Post:
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help to switch dates from a file

Hi. I need some assistance with a file who at the end i must import to EXCEL. The problem is that i have a file with this inside: Output: JOBID START TIME END TIME ELAPSED CPU ------------------------------------------------------------ AVERAGE: ... (2 Replies)
Discussion started by: osramos
2 Replies

2. Shell Programming and Scripting

Jump to a specific place in a file?

If I cat a file And want to go to the first instance of a particular value - what command would I use? And then from that point where I jumped to search for another value - but only search from that point forward not before the file? Thanks~ (2 Replies)
Discussion started by: llsmr777
2 Replies

3. Shell Programming and Scripting

[bash] jump from one txt file to another

Hi all, I need to create a bash script that reads a txt file on a remote (Windows 2003) server, gets the IP-addresses out of it and then fetches the folders to copy out of another txt file. (all files are auto-generated) The IP addresses that don't have a folder_list file should be ignored. At... (31 Replies)
Discussion started by: laurens
31 Replies

4. Shell Programming and Scripting

what is the switch to let sed edit and save file

I remember there is a sed switch i can use to edit and save the file at the same time, but i cannot recall it at all. so instead of -> sed 's/A/B/' file > file-tmp -> mv file-tmp file what can i do to just let sed edit and save the "file" (4 Replies)
Discussion started by: fedora
4 Replies

5. UNIX for Dummies Questions & Answers

Switch and replace columns in a file

HP-UX I have a fixed length file like this 9921190625797AE2560 20091001US20091001@@NEWSITE @@ 20091013001X X 01NEW00DNA00007081 @@ SPRINGFIELD @@ ... (2 Replies)
Discussion started by: rs1969
2 Replies

6. Shell Programming and Scripting

use vimdiff inside while read

Hi, I need to read a file name from a txt file, found the difference in two folders, then modify the file using vimdiff, while read file do diff src/$file dest/$file > /dev/null 2>&1 if ; then vimdiff src/$file dest/$file fi done < ./my_text_file since the stdin has been... (6 Replies)
Discussion started by: laopi
6 Replies

7. Shell Programming and Scripting

Switch string in the file

Dear all, I have file input like this, file input: input.txt ROUTE 0001, ( 10021)=X 71Y 1605, X 1486Y 2220,X 1720Y 2380,X 1962Y 2553,X 2112Y 2650,X 2289Y 2746, YF 5000, ( 10022)=X 71Y 1605, X 498Y... (4 Replies)
Discussion started by: attila
4 Replies

8. Shell Programming and Scripting

Switch line in txt file

Hi I have problem with replace line in txt file , I have this string: 144185 DISK Piece qqr8ot6l_1_1 -- 144186 DISK Piece ukr8pf2e_1_1 -- 144187 DISK Piece ter8p9gc_1_1 -- 144188 DISK Piece 4er8qb84_1_1 and (8 Replies)
Discussion started by: primo102
8 Replies
VIMDIFF(1)						      General Commands Manual							VIMDIFF(1)

NAME
vimdiff - edit two, three or four versions of a file with Vim and show differences SYNOPSIS
vimdiff [options] file1 file2 [file3 [file4]] gvimdiff DESCRIPTION
Vimdiff starts Vim on two (or three or four) files. Each file gets its own window. The differences between the files are highlighted. This is a nice way to inspect changes and to move changes from one version to another version of the same file. See vim(1) for details about Vim itself. When started as gvimdiff the GUI will be started, if available. In each window the 'diff' option will be set, which causes the differences to be highlighted. The 'wrap' and 'scrollbind' options are set to make the text look good. The 'foldmethod' option is set to "diff", which puts ranges of lines without changes in a fold. 'foldcolumn' is set to two to make it easy to spot the folds and open or close them. OPTIONS
Vertical splits are used to align the lines, as if the "-O" argument was used. To use horizontal splits instead, use the "-o" argument. For all other arguments see vim(1). SEE ALSO
vim(1) AUTHOR
Most of Vim was made by Bram Moolenaar, with a lot of help from others. See ":help credits" in Vim. 2001 March 30 VIMDIFF(1)
All times are GMT -4. The time now is 05:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy