junegunn / goyo.vim

:tulip: Distraction-free writing in Vim
MIT License
4.52k stars 118 forks source link

Buffer does not resize after opening temporary buffers #172

Closed gzagatti closed 5 years ago

gzagatti commented 6 years ago

When I open for instance NerdTree in a temporary window, the main window with text does not readjust back to its original position. When closing regular windows I don't have this problem. Do you know what has been disabled by Goyo that causes such behavior?

sunbubble commented 6 years ago

I have the same problem when the quickfix pane is closed automatically by vimtex. If I open and then close the quickfix pane myself everything works. If vimtex opens a quickfix pane it also works fine. Only while closing it, it doesn't resize. Thanks

sunbubble commented 6 years ago

If you use the command ":Goyo x" it'll resize to standard dimensions. For now, as a temporary solution I mapped G to it.

EDIT: I now prefer to use the native vim command ":resize" to accheive the same result

gzagatti commented 6 years ago

I can confirm that using @sunbubble tweak works for me as well, so I re-mapped NERDTreeToggle when entering Goyo to: nnoremap <f8> :NERDTreeToggle<cr>:Goyo x<cr>.

habamax commented 5 years ago

It also happens when you use leaderF plugin to open files/buffers.

BTW, in neovim-qt it doesn't happen

oblitum commented 5 years ago

This is probably a duplicate of #79, which was closed as wontfix.

junegunn commented 5 years ago

You can hit CTRL-W + = to reset the size. And, yeah, :Goyo x should work too. That's an interesting approach :)