" F5: Add a fortune and advance to the next one " mX mark where we are " :sp ~/.fortunes open a window on ~/.fortunes " gg go to first line " d/^--/ delete until the next line starting with "--" " Gp Go to the end and put the just deleted text there " :wq Write the ~/.fortunes file and close the window " 'XG Go to the last line of the original file " A Add an empty line " p put the fortune text " `X return to where we started map mX:sp ~/.fortunesggd/^--/Gp:wq'XGAp`X