Thursday, February 13, 2014

Re: Line formatting

Gary Johnson, 13.02.2014 13:32:
> On 2014-02-13, mvxxc wrote:
> > Hello Vim users,
> >
> > I have noticed that the formatting command "gq" is affected by the options
> > "linebreak" and "columns": If "linebreak" is set, lines are broken at different
> > positions if the value of "columns" varies, i.e. a different terminal size
> > can lead to a different result. Perhaps this should be mentioned in the help
> > pages or formatting should be independent of the number of screen columns?
> >
> > To test it, set options with ":se fex& fp& tw& lbr". Then use ":se co=80" and
> > ":se co=74" to format the following test line with "gqq". In the first case,
> > the line is not changed; in the second case, it is broken before the last word.
> >
> > xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
>
> This is the intentional, documented behavior and is not a bug.
>
> ":help gq" says, in part,
>
> If the 'textwidth' option is 0, the formatted line
> length is the screen width (with a maximum width of
> 79).
>
> In my experiments, this behavior was not affected by 'linebreak'.
>
> Regards,
> Gary

You are right. The column number of the used terminal varied; my mistake. Thank
you for your help.

Regards

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: