Yes, I often seem to make simple mistakes when typing to the vim group. The
command should be:
g/^.\{80,}$/normal gqgq
I discovered the problem. The text I run the script is converted, with
software from a complex PDF file. It includes very long lines as well as
hyphenated lines that are both long (over 80 characters) and short.
I made the script work by setting textwidth=2000 before executing the
command that gets rid of the hyphens, and then resetting it to 75 when I ran
the formatting command that shortens long lines.
Apparently, the hyphen command, which included an EOL character (\n) did not
work on lines that were longer than the value of textwidth.
It took a while to realize that the value of textwidth would affect this
command.
On Fri, 29 Jun 2012, Tim Chase wrote:
> On 06/29/12 01:10, howard Schwartz wrote:
>> "wrap long lines
>> g/^.\{80,}$/gqgq
>
> Are you sure you don't need a "normal" in there?
>
> g/^.\{80,}$/norm gqq
>
> -tim
>
>
>
>
--
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