Oliver <
ol...@invalid.net> wrote:
> Thunderbird drives me nuts with its inability to set a line length.
> (I turned off the HTML long ago which was incapable of correct line feeds).
>
> gVim can set line length, but I can't figure out how yet as this should
> work but it doesn't "do anything" unless you're typing already on the line.
> :set textwidth=80
It's probably best to set a line length (textwidth in vim) and then set
a wrapmargin from that line length, i.e.
:set textwidth=80
:set wrapmargin=8
So you have a textwidth of 80 characters, but the text starts wrapping
at column 72.
Be sure to check the settings by using the same commands without the
'=...' part, i.e.
:set textwidth
:set wrapmargin
> The good news is this doesn't truncate words when it works but it
> doesn't really work because you have to be _editing_ the line to work.
You probably want to be able to reformat a section while you're
composing/editing. Use
:set fo=tcrq
Now you can select a section by Ctrl-V and moving the cursor down over
as many lines of text as you want and then use 'gq' (without quotes) to
reformat the selected lines within the given textwidth and wrapmargin.
> What I do now every time I send a message that has to look nice from
> Thunderbird is write it up in Thunderbird first. Then I cut it out of the
> Thunderbird message (which usually has quoted context that I leave alone).
>
> Then I paste that new content into Windows gVim.
> And then I manually adjust each line's line length to look good.
>
> Then I paste it back into the brain dead Thunderbird.
> Then it looks the way I want (which is simply 80 character line lengths).
>
> Obviously this sucks.
> There must be a better way (and no, HTML styles is NOT that better way).
I *start* in vim, because it's a real editor unlike the Thunderbird's
built-in composer, and then I copy-and-paste the text into Thunderbird's
compose window. (I often do it via an intermediate copy from Notepad, so
close vim, open the textfile in Notepad and copy-and-paste from Notepad
to Thunderbird.)
Still quite cumbersome, but as I don't need that too often, I live
with it. (If somebody knows a way to invoke vim instead of TB's compose
window, please say so.)
> In Linux you can use the ":!fmt" command to format to 80 characters.
See the ':set fo=tcrq' setting. I used to use fmt in the dark ages,
but with vim (instead of vi) it's not needed.
> It too will truncate at a space (and not in the middle of a word).
>
> But Windows doesn't have the capability (as far as I know), unless, of
> course, I go back 30 years to install CYGWIN or the like (which is crazy).
For historical reasons, I use Cygwin, but the Windows version of
[g]vim should be able to do what I have described.
> I can also use WSL if I install it but really all I'm asking for is one of
> two basic switches, one in Thunderbird which almost certainly doesn't
> exist, the other in gVim which probably exists - but I don't know how to
> use it.
>
> Is there a setting to make Thunderbird line lengths 80 characters?
Some way, mine is set to 72 characters, but I don't know where.
> Is there a way to essentially !fmt Windows gVim to 80 characters?
Explained above.