Search This Blog

Saturday, August 13, 2011

splitting vim editor windows horizontally


  • Press :split to split horizontally the currently edited file into two Vi editor windows.

  • Press :split file2 to split the Vi editor windows horizontally. The upper Vi editor windows access to file2 while the bottom Vi editor windows access to the currently edited file.

  • While in splitting mode, press CTRL+WW to switch between split Vi editor window. Copy between files made even easier in split Vi editor windows - just copy the block of lines and press CTRL+WW switching to target file then press p to paste the copied lines.

  • To close splitted  windows press :q.


  •  
    from  http://bloggerdigest.blogspot.com/2006/09/vi-editor-quick-reference.html

    No comments:

    Labels

    Blog Archive