junegunn / goyo.vim

:tulip: Distraction-free writing in Vim
MIT License
4.49k stars 115 forks source link

Line break issue with Neomutt #248

Open christopherisnow opened 3 years ago

christopherisnow commented 3 years ago

Here a plea for tips to fix a line breaking issue with Neomutt. My wish is to have soft line wrapping, so paragraphs don't get broken up automatically into lines at 80 characters.

In init.vim:

set wrap
set linebreak
set textwidth=0
set wrapmargin=0

autocmd BufRead,BufNewFile /tmp/neomutt* let g:goyo_width=80
autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo | set bg=light

When I toggle Goyo in Neovim outside Neomutt, life is good. But I get hard line breaks with Goyo inside Neomutt -- even with this line in muttrc:

set editor="nvim +':set textwidth=0' +':set wrapmargin=0' +':set wrap'"

Oddly, when I toggle out of Goyo in Neomutt and type more than 80 characters in the standard Neovim buffer, I DO get a soft break. I'm stumped...

corbin-zip commented 1 week ago

Change your second line to this: autocmd BufRead,BufNewFile /tmp/neomutt* :Goyo | set bg=light | set formatoptions-=t | set linebreak