junegunn / goyo.vim

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

Weird effect when entering fullscreen with Goyo #152

Open chew-z opened 7 years ago

chew-z commented 7 years ago

When I call Goyo with Limelight for the first time with fullscreen command I am getting weird side-effect. The text is really, really narrow (like maybe 30 char width or less). Toggling Goyo again and then again brings everything back to normal but it is annoying.

When I call Goyo without fullscreen option and set the fullscreen later it shows no side-effects.

My g:goyo_width=80 or 120.

screen shot 2017-05-01 at 18 56 22
function! s:goyo_enter()
    if has('gui_running')
        set fullscreen
        let &showbreak="↳ "
    endif
    ALEToggle
    autocmd InsertLeave * :set norelativenumber
    set nonumber
    set noshowmode
    set noshowcmd
    set scrolloff=99
    Limelight
endfunction

autocmd! User GoyoEnter nested call <SID>goyo_enter()

junegunn commented 7 years ago

I don't know why, but ALEToggle seems to cause the issue.

tombell commented 6 years ago

I'm getting the same effect, and I'm not using ALE. Similarly, after toggling the first time it works as expected.