Monday, August 7th, 2006...7:06 pm
Helpful vi commands
Jump to Comments
These commands helped us split a large file into two smaller components.
To create a split screen:
:split filename (the second screen will fill with either a new file or existing file, depending on whether or not the filename exists or not)
To find out what line you are on:
Ctrl-g
To perform a multi-line cut to that line:
:1 (gets you to the beginning of the cut-worthy text
Ndd (N=number of lines you wish to cut)
To switch between the windows:
Ctrl-ww
To past the multi-line cut:
p
vi, vim, find line, multi-line cut, split screen
Leave a Reply