junegunn / goyo.vim

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

showbreak doesn't work in Goyo #167

Closed dylnmc closed 6 years ago

dylnmc commented 6 years ago

try doing:

set breakindent
set showbreak===>

(for instance)

inside goyo, and it won't work. At least, it didn't for me. Not great considering the fact that goyo is small to begin with so there will be many wrapped lines, and therefore, an obvious need for breakindent.

dylnmc commented 6 years ago

Ah. I finally got around to trying to solve it. For some reason this only happens in Gvim. The issue was that the highlighting for NonText was changing (only in Gvim, though?). I am using nord as my colorscheme, so I put this in my vimrc:

function! s:goyo_enter()
  hi NonText guifg=#4C566A ctermfg=8
endfunction
function! s:goyo_leave()
  hi NonText guifg=#4C566A ctermfg=8
endfunction
autocmd! User GoyoEnter nested call <SID>goyo_enter()
autocmd! User GoyoLeave nested call <SID>goyo_leave()