Hi,
I have a very long article, I want to get abstract from every lesson
quickly, like this:
========================================================================================
Lesson 1 "This is what i want to get
Some Body text here.. "This is _not_ what i want to get
Some Body text here.. "This is _not_ what i want to get
... "This is _not_ what i want to get
-Some Body text might "This is _not_ what i want to get!!
-start with '-' also :( "This is _not_ what i want to get!!
Abstract "This is what i want to get
-every abstrct point "This is what i want to get
-will start with string '-' "This is what i want to get
-... "This is what i want to get
Lesson 2
…
Abstract
-tip1
-tip2
-tip3
-…
-…
.................
Lesson 77
Abstract
-tip1
-tip2
-tip3
-tip4
-…
========================================================================================
I don't want to finish the job by Ctrl+V, Ctrl+C, Ctrl+V, Ctrl+C,
Ctrl+V, Ctrl+C, Ctrl+V... ...
=> Find a quicker way
Now I know with this command:
:g/\(Lesson \d\{1,3}\)\|Abstract\|\(-\)/t$
I can get result like this:
========================================================================================
Lesson 1 "This is what i want to get
-Some Body text might "This is _not_ what i want to get!!
-start with '-' also :( "This is _not_ what i want to get!!
Abstract "This is what i want to get
-every abstrct point "This is what i want to get
-will start with string '-' "This is what i want to get
-... "This is what i want to get
Lesson 2
Abstract
-tip1
-tip2
-tip3
-…
-…
Lesson 77
Abstract
-tip1
-tip2
-tip3
-tip4
-…
==> remained problem
as mentioned before, the body text which is started with string '-' is
also included in the searching list, how can I filter them?
Thanks in advance!
--
Regards, Isaac. (李霆钧)
> http://delicious.com/litingjun
> http://litingjun.amplify.com
> http://xbeta.info/tag/gvim [善用佳软] [一起来学Vim吧]
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---