bairui

Catenate sequential columns

Aug 4th, 2011
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 0.34 KB | None | 0 0
  1. " Catenating sequential columns
  2. " Barry Arthur, Aug 04, 2011
  3.  
  4. function! MergeLines(cnt)
  5.   normal 1G
  6.  
  7.   normal 10dd
  8.   normal "a10dd
  9.   normal "b10dd
  10.  
  11.   call setreg('a', getreg('a'), 'b')
  12.   call setreg('b', getreg('b'), 'b')
  13.  
  14.   normal 1G0|
  15.   normal ^VGI    
  16.   normal 1G2|
  17.   normal ^VG"bP
  18.   normal 1G0|
  19.   normal ^VG"aP
  20. endfunction
Advertisement
Add Comment
Please, Sign In to add comment