junegunn / goyo.vim

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

Undefined variable: t:goyo_pads #158

Open eater opened 6 years ago

eater commented 6 years ago

I've used Goyo in the past with no problem. Today I ran :Goyo and it said

Error detected while processing function <SNR>152_blank:
line    1:
E121: Undefined variable: t:goyo_pads
Error detected while processing function <SNR>152_blank:
line    1:
E116: Invalid arguments for function bufwinnr(t:goyo_pads.r) <= bufwinnr(t:goyo_pads.l) + 1 || bufwinnr(t:goyo
_pads.b) <= bufwinnr(t:goyo_pads.t) + 3
Error detected while processing function <SNR>152_blank:
line    1:
E15: Invalid expression: bufwinnr(t:goyo_pads.r) <= bufwinnr(t:goyo_pads.l) + 1 || bufwinnr(t:goyo_pads.b) <=
bufwinnr(t:goyo_pads.t) + 3

Presumably conflicting with something? Any idea what it might be?

eater commented 6 years ago

Apparently it conflicts with christoomey/vim-tmux-navigator. Any idea how to resolve?

OndraX commented 5 years ago

I am having the same issue but do not have vim-tmux-navigator installed. I attach the output of vim's :scriptnames.command if anyone wants to look into this. scripts.txt

larsyencken commented 3 years ago

This is probably not super helpful, but I was using a vim line that made vim quit if no buffers were alive:

" quit if no buffers are alive
autocmd BufDelete * if len(filter(range(1, bufnr('$')), '! empty(bufname(v:val)) && buflisted(v:val)')) == 1 | quit | endif

It turns out that this made Goyo fail horribly, causing the undefined variable above. Removing it made everything work again.