Skip to main content
added 14 characters in body
Source Link

you can create the following function, in your .bashrc or the command line:

mydiff () { 
vimdiff $1 $2    +'1sp
                   se noscb
                   winc l
                   1sp
                   se noscb
                   winc h
                   winc j'
}

Explanation :

  • 1sp1sp : creates a split
  • se noscbse noscb : set noscrollbind for the newly created window
  • winc lwinc l : go the window on the right
  • 1sp1sp : do a screen split
  • se noscbse noscb : set noscrollbind for the newly created window
  • winc hwinc h and winc jwinc j : go back to the first window

then just call the function as follows:

mydiff table1 table2

you can create the following function, in your .bashrc or the command line:

mydiff () { 
vimdiff $1 $2    +'1sp
                   se noscb
                   winc l
                   1sp
                   se noscb
                   winc h
                   winc j'
}

Explanation :

  • 1sp : creates a split
  • se noscb : set noscrollbind for the newly created window
  • winc l : go the window on the right
  • 1sp : do a screen split
  • se noscb : set noscrollbind for the newly created window
  • winc h and winc j : go back to the first window

then just call the function as follows:

mydiff table1 table2

you can create the following function, in your .bashrc or the command line:

mydiff () { 
vimdiff $1 $2    +'1sp
                   se noscb
                   winc l
                   1sp
                   se noscb
                   winc h
                   winc j'
}

Explanation :

  • 1sp : creates a split
  • se noscb : set noscrollbind for the newly created window
  • winc l : go the window on the right
  • 1sp : do a screen split
  • se noscb : set noscrollbind for the newly created window
  • winc h and winc j : go back to the first window

then just call the function as follows:

mydiff table1 table2
Source Link

you can create the following function, in your .bashrc or the command line:

mydiff () { 
vimdiff $1 $2    +'1sp
                   se noscb
                   winc l
                   1sp
                   se noscb
                   winc h
                   winc j'
}

Explanation :

  • 1sp : creates a split
  • se noscb : set noscrollbind for the newly created window
  • winc l : go the window on the right
  • 1sp : do a screen split
  • se noscb : set noscrollbind for the newly created window
  • winc h and winc j : go back to the first window

then just call the function as follows:

mydiff table1 table2