Monday, June 4, 2012

RE: Repeat gq from : command line?

howard Schwartz wrote:
> That is correct, my typing error. But there is still
> something wrong with this expression. For instance, when I do
> simple search with this expression like this:
>
> /^[[:lower:][:punct:]]\{3,}/
>
> Vim selects lines that begin with a Capitol letter like these:

That's because you have 'ignorecase' set (check with :set ic?
including the question mark).

The best fix is to include \C in the search pattern. It can go
anywhere, for example just before the final slash at the end.

> I want it to mark one range of lines, do the gq command, move
> the cursor to the end of the filtered lines, and then repeat
> the sequence till the end of file.

I have not followed this thread, but :g// works like this:
First, Vim notes all lines where a hit occurs, then, Vim returns
to the beginning and performs the operation on the first hit,
then the next, etc. That is, it will not move to the end of the
filtered lines.

I see a couple more messages about the issue. If it's not
resolved soon, please reply to this with a brief statement of
what you last tried (don't rehash the history), and what you
would like it do.

John

--
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

No comments:

Post a Comment