drlatex wrote:
> 
> Hello,
> 
> I have a big file, that looks someone like this:
> 
> asdf....|name1|....asdf
> asdf....|name2|..asdf
> asdf....|name3|....asdfa
> 
> where the ellipses (dots) represent large amounts of letters, and there are
> 500 sections separated by '>'
> 
> I want, instead of this one big file, 500 smaller files that only have '>'
> once:
> 
> file 1:
> asdf...|name|...asdf
> 
> file 2:
> asdf...|name|...asdf
> 
> file 3:
> asdf...|name|...asdf
> 
> and so on.
> 
> ----
> I'm a beginner at vim, so I don't know what the best way to do this is.
> 
> I can search for '>' and then at the 2nd '>' I can do :.,$de to create the
> first file. 
> But I don't know how save that deleted material into a second file and
> repeat this procedure in a loop.
> 
> Also, when the new files are created, I want their names to be whatever is
> in between the vertical bars (the vertical bars, that I denoted by " |name|
> " will only show up once in each prospective file, so it should be easy to
> search for the appropriate names).
> 
> Is this possible in vim ??
> Or if not, is there some simple programing language that would be able to do
> something like this ??
> 
> Thanks a lot in advance for all those who respond!
> 
> 
> 
http://www.mkssoftware.com/docs/man1/csplit.1.asp

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to