Solaris Advanced User's Guide

Moving Lines

The basic form of the ex move command is similar to the copy command that is discussed in the previous section.


:line#,line# m line#

Line ranges and insertion points are specified in the same ways, including use of the abbreviations . and $. The difference in function is simply that “move” removes a block from one location and reinserts it elsewhere.

For example, to move lines 1 through 5 to the line following 12, you would type:


:1,5 m 12

Then press Return.