I am writing some documentation (a user guide),in markdown in Vim.I now realise what I though should be one page, really should be 2.But I've already written alot of of both halvesHow can I split the file at the cursor (or some other marker),into two separate files?For Example:Wholefile.md:But I must explain to you how all this mistaken idea of denouncing of a pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.     No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but occasionally circumstances occur in which toil and pain can procure him some great pleasure.Part1.md:But I must explain to you how all this mistaken idea of denouncing of a pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. Part2.md:No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but occasionally circumstances occur in which toil and pain can procure him some great pleasure.
How do I break a file into two?
multiple files;file operations
Move the cursor to the last line of Part 1.Type Vgg to select the first part, and :w Part1.md<cr> to save that section to the first file.Press `>j, which will move the cursor to the first line of Part 2.Type VG to select the second part, and :w Part2.md<cr> to save that section to the second file.