Thursday, November 26, 2009

Re: A quick way to get abstract from a very _long_ article?

On Thu, Nov 26, 2009 at 7:23 PM, Isaac <tingjun.li@gmail.com> wrote:
Hello, tim: 

thanks!

On Thu, Nov 26, 2009 at 9:03 AM, Tim Chase <vim@tim.thechases.com> wrote:

Depending on the complexity of your document and how whitespace
is treated, you can do most of them pretty easily:

   :g/^Lesson \d\+//^Abstract/;/^-\@!/t$


through the help of manual, i can get the following symbol's meaning now. 

^ To the first non-blank character of the line.
|exclusive| motion.

\d digit: [0-9] */\d*

\+ Matches 1 or more of the preceding atom, as many as possible. {not in
Vi}
Example matches ~
^.\+$ any non-empty line
\s\+ white space of at least one character

/;      E386    A very special offset is ';' followed by another search command. 

\@! Matches with zero width if the preceding atom does NOT match at the
current position. |/zero-width| {not in Vi}
Like '(?!pattern)" in Perl.

remained question: what does "//" mean?

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

No comments: