Hi HermannHeilner!

On Mo, 20 Sep 2010, HermannHeilner wrote:

> 
> Hello Vim users,
> 
> I'm molecular biologist and therefore often work with long textstrings
> consisting of only 4 letters in a long sequence. I would like to do the
> following:
> 
> Search a specific pattern A, then search a specific pattern B, then mark the
> letters between these two patterns and copy these into a new file.
> 
> First of all, I normally just use Vim to view and write simple text.
> Therefore i don't know anyting about what Vim else can do.
> 
> Second, is it possible AND convenient to do this job in Vim?

First and second yes. 

For example, you search from the current cursor position the beginning 
of foobar and want to write until the next baz. You can simply do this:
/^foobar/+,/^baz/-w foobar.txt
This copies the text between the lines to the file foobar.txt If you 
want to include the start and end patterns, leave the + and - signs out.

> 
> Third, what would be an alternative way to solve the problem?

sed, awk, perl (But you don't need neither of them. Vim can do it)

regards,
Christian

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to