Their hierarchical relationship remains the unaltered. Their hierarchical relationship remains the unaltered. This may leave some headlines collapsed. You can expand them with the zO command. See the VI help file for cut and paste info.
Most outline processors place a plus sign to the left of a headline when it's collapsed.
Vim6 instead places a dashed line with a colored background, showing the number of lines collapsed and the text of the first hidden line. This is the one Vim6 feature I view as inferior to dedicated outline processors, but given the fact that Vim6 was never intended to be an outline processor, it's something I can live with. You'll probably want to run this script on A COPY of the outline so you can continue working on the outline. The third through ninth lines replace a header tag and subsequent tab by an incremented header tag. The final line reads each initial header tag, and appends a matching closing tag.