This PR implements two somewhat orthogonal changes.
If you'd like to only have one of these changes but not the other, I'm
happy to split this PR up and send the changes individually, but since
the two of them together would have merge conflicts independently, I've
authored them in a single PR.
The two changes:
Allow b: variants of the documented configuration variables.
This allows setting things like goyo_width to different settings
in different file types or different buffers, by setting a
buffer-scoped variable.
Default goyo_width to &textwidth + 1 if it is set and neither
b:goyo_width nor g:goyo_width are set. The + 1 is to handle an
off-by-one error where for a line that has exactly &textwidth
characters, goyo would force the line to wrap.
I've been using these changes locally for some files where I have
textwidth set to values larger and smaller than 80, and have been
working well.
Thanks for your work on Goyo by the way—it makes writing in Vim rather
enjoyable.
This PR implements two somewhat orthogonal changes.
If you'd like to only have one of these changes but not the other, I'm happy to split this PR up and send the changes individually, but since the two of them together would have merge conflicts independently, I've authored them in a single PR.
The two changes:
Allow
b:
variants of the documented configuration variables. This allows setting things likegoyo_width
to different settings in different file types or different buffers, by setting a buffer-scoped variable.Default
goyo_width
to&textwidth + 1
if it is set and neitherb:goyo_width
norg:goyo_width
are set. The+ 1
is to handle an off-by-one error where for a line that has exactly&textwidth
characters, goyo would force the line to wrap.I've been using these changes locally for some files where I have
textwidth
set to values larger and smaller than 80, and have been working well.Thanks for your work on Goyo by the way—it makes writing in Vim rather enjoyable.