Re: make 'gq' not join lines
>> I'm looking for a way to prevent 'gq' from joining lines. I'dInterestingly, this exact version doesn't work for me. It seems Vim computes the
>> like to know whether there's a way to make it only wrap long
>> lines without joining any lines.
> The times that I've wanted to do this, I often use
> :%norm gqq
> where "%" is whatever range (often "'<,'>") I want to perform
> this on.
line numbers of the range and then sticks to them even though the text grows by
virtue of the normal command, thus it stops at the line number which would have
been the last line in the buffer before the command was executed, but now isn't,
so part of the buffer is left unprocessed.
The same happens when using marks such as '<,'>.
Do you see that behaviour?
Perhaps this qualifies for the todo list, Bram?
> Alternatively, it works nicely with the :g and :vIt does work as
(I just picked ^ as I knew it would match on every line). I guess the g command is
smarter because it expects that a changing number of lines is a common use case so
it's been accounted for.
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php